C# 2.0:
The major features of C# 2 were
generics, nullable types, anonymous methods and other delegate-related enhancements and iterator blocks
. Additionally, several smaller features were introduced:
partial types, static classes, properties with different access modifiers for getters and setters, namespace aliases, pragma directives and fixed-sized buffers.
Some more features:
Click here[
^]
C# 3.0:
C# 3 primarily built towards
LINQ,
although many features are useful elsewhere. Automatic properties, implicit typing of arrays and local variables, object and collection initializers and anonymous types. Lambda expressions and expression trees extended the delegate-related progress made in version 2.0, and extension methods provided the last ingredient for query expressions. Partial methods were only added in C# 3, although partial types themselves were in C# 2. As Marc points out in the comments, generic type inference received a considerable boost in C# 3.
Some more features:
Click here[
^]
C# 4.0:
C# 4.0 has some features aimed at interoperability, but doesn't have the same single-mindedness of C# 3.0. Again there's a reasonably clear divide between the "small" features (named arguments, optional parameters, better COM interop, generic variance) and the huge feature of
dynamic typing.
Some more features:
Click here[
^]