什么C#4.0的功能,同时仍然面向.NET 3.5运行时使用? [英] What C# 4.0 features can be used while still targeting the .NET 3.5 runtime?

查看:199
本文介绍了什么C#4.0的功能,同时仍然面向.NET 3.5运行时使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用C#3.0,你可以使用它的许多功能(对象初始化,VAR变量,lambda表达式),同时还针对.NET 2.0或3.0。

With C# 3.0 you could use many of its features (object initializers, var variables, lambda expressions) while still targeting .NET 2.0 or 3.0.

什么新的C# 4.0功能,同时仍然面向.NET 2.0,3.0或3.5运行时可以使用?

What new C# 4.0 features can be used while still targeting the .NET 2.0, 3.0 or 3.5 runtimes?

推荐答案


  • 动态特性:大概不会。我想他们可以实现无DLR动态功能,但似乎并不可能。

  • Dynamic features: Probably not. I suppose they COULD implement the dynamic features without the DLR, but that doesn't seem likely.

    新的通用约束:CLR支持他们

    New generic constraints: The CLR supports them

    可选,并命名为:CLR已经支持它(VB-风格)

    Optional and named: CLR already supports it (VB-style)

    更新:我刚听说C#4编译器将不低于4.0框架支持什么

    Update: I just heard that C# 4 compiler will not support anything under 4.0 framework.

    这篇关于什么C#4.0的功能,同时仍然面向.NET 3.5运行时使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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