C# 3.0 Features - Part 3.6 Extension Methods

Apr
24
2011
In Categories: .NET | CLR
Tags | |

You can see part 0 here, part 1 here, part 2 here, part 3 here, part 4 here and part 5 here This feature adds extension to your design. if we have closed assembly and we need to add function to this class. We can use extension methods as we see in the next piece of code  ... [More]

C# 3.0 Features - Part 3.5 Anonymous Type

Apr
24
2011
In Categories: .NET | CLR
Tags | |

You can see part 0 here, part 1 here, part 2 here, part 3 here and part 4 here In my opinion, this is the last feature view which increases the developer's productivity. You can simply create an object without naming it. You must use Implicit Typing while defining the anonymous ... [More]

C# 3.0 Features - Part 3.4 Implicit Typing

Apr
24
2011
In Categories: .NET | CLR
Tags | |

You can see part 0 here, part 1 here, part 2 here and part 3 here This is another feature that will increase the flexibility and the productivity for the developer. Instead of typing this line of code     1 Dictionary<string, string> foo = ... [More]

C# 3.0 Features - Part 3.3 Collection Initializers

Apr
24
2011
In Categories: .NET | CLR
Tags | |

You can see part 0 here, part 1 here and part 2 here This is also feature that helps the developer to be more productive. Let's see how we can use it.     1 List<int> digits = new List<int> { 0, 1, 2, 3 }; As you can see, we just fill in t... [More]

C# 3.0 Features - Part 3.2 Object Initializers

Apr
24
2011
In Categories: .NET | CLR
Tags | |

You can see part 0 here and part 1 here This feature allows properties to be set with constructor call. I consider this as one of the features that increases the developer productivity. Also you can use it with anonymous objects (we will explain them later). If we have this class ... [More]

C# 3.0 Features - Part 3.1 Automatic Property

Apr
24
2011
In Categories: .NET | CLR
Tags | |

To you can see part 0 here In the past we got used to write property like this     1 public class Person     2 {     3     string _firstName;     4     string... [More]

C# 3.0 Features - Part 3.0

Apr
24
2011
In Categories: .NET | CLR
Tags | |

You can see C# 2.0 Features series starting from here C# 3.0 comes out with many features. I would like to classify them as features that Increased developer's productivity, Extensibility concepts and Functional programming Concepts. The first group of features are Automatic Properties, Object Init... [More]

C# 2.0 Features - Part 2.8 Null-Coalescing Operator

Sep
05
2010
In Categories: .NET | CLR
Tags | |

You can see part 1 here, part 2.1 here, part 2.2 here, part 2.3 here, part 2.4 here, part 2.5 here, part 2.6 here and part 2.7 here. You will need this a lot when assigning nullable value or object value to one of the value types. We use the "??" to replace "?:" in some cases. Let's see this e... [More]

C# 2.0 Features - Part 2.7 Nullable types

Sep
02
2010
In Categories: .NET | CLR
Tags | |

You can see part 1 here, part 2.1 here, part 2.2 here, part 2.3 here, part 2.4 here, part 2.5 here and part 2.6 here. This feature solves a lot of problems and eliminates some logic we get used to write. Before Nullable types we get used to set the value types variable that are loaded from the... [More]

C# 2.0 Features - Part 2.6 Property Access Modifiers

Aug
26
2010
In Categories: .NET | CLR
Tags | |

You can see part 1 here, part 2.1 here, part 2.2 here, part 2.3 here, part 2.4 here and part 2.5 here You should know about property to understand this article. Actually if you don't know what property is then I do recommend not to continue reading this post and start from here. In framework 1... [More]