It’s not the easiest of documents to read: the C# 3.0 specification. On my recent endeavours with Linq and DLinq in particular, I read through it. Most of what is new in C# 3.0 is there to make the Language Integrated Queries possible. The spec is very technical, so I thought I would break it down into smaller pieces and explain C# 3.0 in a more understandable way.
The next couple of post entries will cover each of the new language enhancements in C# 3.0. These are, in no particular order:
- Extensions methods
- Implicitly typed local variables and arrays
- Anonymous types
- Object and collection initializers
- Lambda expressions
- Expression trees
- Query expressions
I will assume that you are familiar with the C# 2.0 enhancements, i.e. generics, anonymous methods, iterators and partial types. We’ll be making use of the first two for quite a bit.
Once you and me are through this primer on C# 3.0, we’re ready to take on Linq, DLinq and XLinq. Cool stuff is to follow.