Stories recently tagged with 'Methods'

Manipulating Properties and Methods with Reflection(www.leniel.net)

submitted by lenielleniel(504) 1 year, 11 months ago

Today I’m going to write about a simple yet powerful way to manipulate properties and methods of a given type. We’ll set values to properties and invoke methods through the use of reflection. Maybe you haven’t had the chance to use reflection or maybe you even don’t know what is reflection. Reflection is one of the most powerful features a programming language has as is the case of C# programming language that I’ll be using in this post. Read on... read more...

add a comment |category: |Views: 11

tags: another

Getting Started with LINQ - Part 2 (Language Enhancements)(beyondrelational.com)

submitted by DPalkarDPalkar(228) 2 years ago

In my previous post I summarized Microsoft Language Integrated Query (LINQ). Briefly discussed about its components as well as showed some code examples to highlight the sql query type syntax it uses. When we talk about LINQ, we are talking about number of little features that were added in .net 3.0 framework which are the building blocks of the LINQ. In this post I will discuss these features a little further as follows. Object Initializers Collection Initializers Anonymous Types, Implicitly Typed variables (var keyword) Lambda Expressions Partial Methods Extension Methods read more...

1 comment |category: |Views: 258

tags: another

IQueryable: Sorting, Paging, Searching and Counting(inflecto.co.uk)

submitted by rmmasonrmmason(25) 2 years, 6 months ago

A good post that contains extension methods that add sorting, paging, seacrching and countain functionality to IQueryable objects. read more...

add a comment |category: |Views: 115

tags: another

Finding missing numbers in a list using LINQ with C#(leniel.net)

submitted by lenielleniel(504) 2 years, 7 months ago

Let’s say you have a list of integer values that represent the days of a month like this: 6, 2, 4, 1, 9, 7, 3, 10, 13, 15, 19, 11, 18, 13, 22, 24, 20, 27, 31, 25, 28 - Clearly we have missing numbers/days in the list. They are: 5 8 12 14 16 17 21 23 26 29 30. It’s really easy to get a list of missing numbers using LINQ with C# and the Except operator. LINQ is the greatest addition to the C# language. I can imagine how life would be difficult if we hadn’t LINQ! This post shows how I implemented a missing numbers finder using a C# extension method. read more...

add a comment |category: |Views: 17

tags: another

How to prevent Extension methods from appearing as global functions(msmvps.com)

submitted by JoacimJoacim(255) 2 years, 11 months ago

C# have static (or shared) classes which VB lacks. Instead VB uses modules which are almost the same thing. One thing differs though and that is that modules makes its public methods appear as global accessible functions, meaning you don’t have to type the ModuleName.MethodName() when calling such a member. You can instead simply call MethodName() directly. A disadvantage of this fact is that extension methods, that must exist in modules in VB, will appear in IntelliSense as global functions and not only as a method of the type you extended. read more...

add a comment |category: |Views: 13

tags: another

Implementing the Each method in C# collections.(blog.latrompa.com)

submitted by hgarciahgarcia(1534) 4 years, 4 months ago

Ruby has it, Prototype add it to JavaScript array. I find myself using it a lot, why not to implement it in C#? Take a look at a quiet take on this one. read more...

add a comment |category: |Views: 7

tags: another

Introducing C# 3 – Part 2(programmersheaven.com)

submitted by pheavenpheaven(430) 4 years, 5 months ago

This is the second of a four part series on C# 3.0. It covers extension methods, explaining what they are, when to use them and how to write them. It then moves on to lambda expressions, explaining the syntax and showing how C# 2.0 anonymous methods can be re-written using the new syntax. It also looks at how type inference and lambda expressions work together. read more...

add a comment |category: |Views: 12

tags: another

C# Functional Methods(blackwasp.co.uk)

submitted by BlackWaspBlackWasp(4217) 4 years, 10 months ago

The forty-fifth part of the C# Fundamentals tutorial expands upon the creation of methods described in the previous instalment. In this article, the creation of methods that return a value and that can accept parameters is considered. read more...

add a comment |category: |Views: 3

tags: another

Finding the name of your calling method(jeremyjarrell.com)

submitted by jeremyjarrelljeremyjarrell(2685) 5 years, 3 months ago

Here's an easy way to find out the name of the method who called you, or the method who called that one, or the method who called that one.... read more...

add a comment |category: |Views: 3

tags: another