By tag: Methods
0
kicks
Manipulating Properties and Methods with Reflection
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. Reflecti...
0
kicks
Getting Started with LINQ - Part 2 (Language Enhancements)
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...
0
kicks
IQueryable: Sorting, Paging, Searching and Counting
A good post that contains extension methods that add sorting, paging, seacrching and countain functionality to IQueryable objects.
0
kicks
Finding missing numbers in a list using LINQ with C#
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 missin...
0
kicks
How to prevent Extension methods from appearing as global functions
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...
0
kicks
Implementing the Each method in C# collections.
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.
0
kicks
Introducing C# 3 – Part 2
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 lo...
0
kicks
C# Functional Methods
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.
0
kicks
Finding the name of your calling method
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....