What features of .NET 3.5 can be used in a .NET 2.0 application?

前端 未结 1 352
一向
一向 2021-01-16 06:55

I have an app that I am developing in Visual Studio 2008, but the projects are set to .NET 2.0. The application will run on a box that only has .NET 2.0 installed.

相关标签:
1条回答
  • 2021-01-16 07:29

    With no external libraries you can use

    • Lambda expressions
    • Object Initializers
    • Collection Initializers
    • Extension Methods
    • Autoproperties

    With the help of an external library like LINQBridge you can also use in memory LINQ queries.

    The main feature you cannot use are expression trees because they rely on fixes in the CLR which are not present in a vanilla 2.0 install

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