What are some of the new features that can be used in .NET 2.0 that are specific to C# 3.0/3.5 after upgrading to Visual Studio 2008? Also, what are some of the features that aren't available?
Available
- Lambdas
- Extension methods (by declaring an empty System.Runtime.CompilerServices.ExtensionAttribute)
- Automatic properties
- Object initializers
- Collection Initializers
- LINQ to Objects (by implementing IEnumerable extension methods, see LinqBridge)
Not Available
- Expression trees
- WPF/Silverlight Libraries
You can use Mono's version of the System.Core which fully supports LINQ & Expression Trees. I compiled its source against .net 2.0, and now I can use it in my .net2.0 projects. This is great for projects that needs to be deployed on win2k, where .net3.5 is not available.