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

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

问题描述

我有一个应用程序,我在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#编译器的一些功能,

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,lambdas,对象初始化器,集合初始化器和其他编译器糖果。

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

推荐答案

没有外部库可以使用


  • Lambda表达式

  • 对象初始化程序

  • 集合初始化程序

  • 扩展方法

  • 自动程序

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

借助外部库,如 LINQBridge ,您还可以在内存中使用LINQ查询。

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

您不能使用的主要功能是表达式树,因为它们依赖于CLR中的修补程序不存在于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 3.5的哪些功能可以在.NET 2.0应用程序中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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