How to improve as programmer?

In the wake of ever changing technology, there are still lot of new technical knowledge that programmers need to grasp. In short, it’s essential for programmers having this capability of quickly grasping new knowledge as it will determine their level of career development and outlook. The most important and fundamental skillset for programmers are learning... Continue Reading →

Programming is like Cultivating

IMHO, programming is like cultivating. Initially, when I started to learn programming, I always thought that programming is just a tool to achieve something in software. It was hard and boring to some extent. There are some syntax and special keywords that I need to remember which I don’t understand. Shameless to say, I was... Continue Reading →

LINQ (Language Integrated Query)

LINQ, as you may already know, looks like TSQL queries, except they are twisted upside down, and written in right inside of C#. You have probably already heard about the benefits, so I won't go into those for now. In here, we are going to talk about Query Expression Translation. You can write queries in LINQ... Continue Reading →

Object and Collection Initializers

First Object Initializers Lets say, you had a class as shown below - public class Monkey{private string monkeyName;private int age; public string Name { get { return monkeyName; } set { monkeyName = value; } }public int Age { get { return age; } set { age = value; } } } The above can be easily instantiated as shown below - var gwBush... Continue Reading →

Extension Methods

Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type. For client code written in C# and Visual Basic,... Continue Reading →

C# Anonymous Methods & The Action Object

Two interesting additions to the 2.0 C# language are the Action<> object, and anonymous methods. The Action<> object lets you specify an action to be performed on an object. And the anonymous method lets you specify a method with no body (thus... the anonymity). The Action Object public delegate void Action<T>(T obj); The Action object is used to... Continue Reading →


When the C# compiler encounters an #if directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and only tests whether the symbol has... Continue Reading →


Beginning in Visual C# 3.0, variables that are declared at method scope can have an implicit type var. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type. The following two declarations of i are functionally equivalent: Beginning in Visual C# 3.0,... Continue Reading →

Using Types from Other Namespaces

n order to use a class that isn’t defined in one of the WPF namespaces, you need to map the .NET namespace to an XML namespace. XAML has a special syntax for doing this, which looks like this: xmlns:Prefix=”clr-namespace:Namespace;assembly=AssemblyName” Typically, you’ll place this namespace mapping in the root element of your XAML document, right after... Continue Reading →

Lambda Expressions

A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types. All lambda expressions use the lambda operator =>, which is read as "goes to". The left side of the lambda operator specifies the input parameters (if any) and the right side holds the... Continue Reading →

Create a website or blog at

Up ↑