C# .NET 3.0/3.5 features in 2.0 using Visual Studio 2008

前端 未结 7 1953
醉话见心
醉话见心 2020-12-09 05:27

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 tha

相关标签:
7条回答
  • 2020-12-09 06:00

    I cover this in an article on my site.

    Almost all C# 3.0 features are available when targeting .NET 2.0. For extension methods, you need to define an extra attribute. Expression trees aren't available at all. Query expression support is based on a translation followed by "normal" C# rules, so you'll need something to provide the Select, Where etc methods. LINQBridge is the de facto standard "LINQ to Objects in .NET 2.0" implementation. You may well want to declare the delegates in the Func and Action delegate families to make it easier to work with lambda expressions - and then remove them if/when you move to .NET 3.5

    0 讨论(0)
提交回复
热议问题