可以在.NET 2.0应用程序中使用了哪些.NET 3.5的功能? [英] What features of .NET 3.5 can be used in a .NET 2.0 application?

查看:92
本文介绍了可以在.NET 2.0应用程序中使用了哪些.NET 3.5的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我正在开发在Visual Studio 2008的应用程序,但这些项目都设置为.NET 2.0。该应用程序将运行在一个盒子,只有安装.Net 2.0。

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.

我知道我可以使用一些.NET 3.5 C#编译器的功能和它编译我的code到MSIL是.NET 2.0运行时理解。

I understand that I can use some of the features of the .NET 3.5 c# compiler and that it compiles my code to MSIL that .NET 2.0 runtime understands.

什么是.NET 3.5的功能,我可以在我的.NET 2.0的应用程序使用?

What are the features of .NET 3.5 that I can use in my .NET 2.0 app?

编辑:我心目中的扩展方法,LINQ中,Lambda表达式,对象初始化器,集合初始化器和其他编译器糖果

what I have in mind is Extension Methods, Linq, lambdas, object initializers, collection initializers and other compiler candy.

推荐答案

在没有外部库,你可以使用

With no external libraries you can use

  • LAMBDA EX pressions
  • 对象初始化
  • 集合初始化
  • 扩展方法
  • Autoproperties

使用外部库的帮助,如 LINQBridge 你也可以在内存中的LINQ使用查询。

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

您不能使用的主要特点是前pression树,因为它们依赖于修复了CLR不属于present在一个香草2.0安装

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

这篇关于可以在.NET 2.0应用程序中使用了哪些.NET 3.5的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆