I worked on the .NET 1.1 project for a long time, and I was stuck at C# 1.0 and now I would like to catch up with the latest and greatest.
Google returned a lot of information on new features in C# v2.0, but for the versions 3 and 4 I found only partial information.
Is there somewhere on the Internet some list of all new features introduced in C# in v2.0, v3.0 and v4.0?
Complete plug for my own book, but hopefully not gratuitous: get hold of the early access version of the second edition of C# in Depth. It skips C# 1, but goes into detail on every feature of C# 2, 3 and 4.
If you just want a list of features though, from appendix C:
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.
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 are all covered in chapter XREF ch8 . 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.
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.
I've got a "bluffers guide" for C# 2 and another for C# 3, but I haven't done the equivalent for C# 4 yet I'm afraid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With