什么是C#的正确版本号? [英] What are the correct version numbers for C#?

查看:404
本文介绍了什么是C#的正确版本号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是C#的正确版本号?什么出来的时候?为什么我不能找到任何答案关于C#3.5?

What are the correct version numbers for C#? What came out when? Why can't I find any answers about C# 3.5?

这问题主要是帮助那些谁使用了不正确的版本号寻找答案,例如C#3.5。希望是任何人都无法找到与错误的版本号的答案将找到的这个的问题,然后用正确的版本号重新搜索。

This question is primarily to aid those who are searching for an answer using an incorrect version number, e.g. "C# 3.5". The hope is that anyone failing to find an answer with the wrong version number will find this question and then search again with the right version number.

推荐答案

这是在写这篇文章的时候知道关于C#的版本:

These are the versions of C# known about at the time of this writing:


  • C#1.0 使用.NET 1.0和VS2002(2002年1月)
  • 发布
  • C#1.2 (奇怪的是足够了);使用.NET 1.1和VS2003(2003年4月)发布。第一个版本叫的Dispose 的IEnumerator ■哪些实施的IDisposable 。一些小等特点。

  • C#2.0 与.NET 2.0和VS2005发布(2005年11月)。主要的新功能:泛型,匿名方法,可空类型,迭代器块

  • C#3.0 使用.NET 3.5和VS2008发布(2007年11月)。主要的新特性:波长前pressions,扩展方法,前pression树木,匿名类型,隐式类型( VAR ),查询前pressions

  • C#4.0 与.NET 4和VS2010(2010年4月)发布。主要的新特性:后期绑定(动态),委托和接口的通用变异,更COM支持,命名参数,元组数据类型和可选的参数

  • C#5.0 与.NET 4.5和发布VS2012(2012年8月)。 主要功能:异步编程,来电信息属性。重大更改:<一href=\"http://blogs.msdn.com/b/ericlippert/archive/2009/11/16/closing-over-the-loop-variable-part-two.aspx\">loop可变封。

  • C#6.0 与.NET 4.6和发布VS2015(2015年7月)。由罗斯林。特点:初始化用于自动实现的属性,使用指令引入静态成员,异常过滤器,索引成员和元素初始化,等待最后,延长添加在集合初始化方法。

  • C# 1.0 released with .NET 1.0 and VS2002 (January 2002)
  • C# 1.2 (bizarrely enough); released with .NET 1.1 and VS2003 (April 2003). First version to call Dispose on IEnumerators which implemented IDisposable. A few other small features.
  • C# 2.0 released with .NET 2.0 and VS2005 (November 2005). Major new features: generics, anonymous methods, nullable types, iterator blocks
  • C# 3.0 released with .NET 3.5 and VS2008 (November 2007). Major new features: lambda expressions, extension methods, expression trees, anonymous types, implicit typing (var), query expressions
  • C# 4.0 released with .NET 4 and VS2010 (April 2010). Major new features: late binding (dynamic), delegate and interface generic variance, more COM support, named arguments, tuple data type and optional parameters
  • C# 5.0 released with .NET 4.5 and VS2012 (August 2012). Major features: async programming, caller info attributes. Breaking change: loop variable closure.
  • C# 6.0 released with .NET 4.6 and VS2015 (July 2015). Implemented by Roslyn. Features: initializers for automatically implemented properties, using directives to import static members, exception filters, indexed members and element initializers, await in catch and finally, extension Add methods in collection initializers.

有没有这样的事情作为C#3.5 - 在这里混乱的原因是C#3.0在.NET 3.5 present。语言和框架的独立然而版本, - 这是CLR的,它通过3.5,.NET 4中引入CLR 4.0,服务包,尽管是面向.NET 2.0版本2.0。在.NET 4.5的CLR有各种改进,但版本还不清楚:在一些地方,可能被称为CLR 4.5(的这个MSDN页面用来指代这种方式,例如),但<一个href=\"http://msdn.microsoft.com/en-us/library/system.environment.version.aspx\"><$c$c>Environment.Version物业仍然报告4.0.xxx。

There is no such thing as C# 3.5 - the cause of confusion here is that the C# 3.0 is present in .NET 3.5. The language and framework are versioned independently, however - as is the CLR, which is at version 2.0 for .NET 2.0 through 3.5, .NET 4 introducing CLR 4.0, service packs notwithstanding. The CLR in .NET 4.5 has various improvements, but the versioning is unclear: in some places it may be referred to as CLR 4.5 (this MSDN page used to refer to it that way, for example), but the Environment.Version property still reports 4.0.xxx.

关于语言,运行时和框架版本之间的关系更详细的信息可在 C#中的深度现场。这包括有关,其中C#3.0 .NET目标2.0时可以使用的功能的信息。 (如果有人希望把所有的内容到这个维基回答,他们欢迎。)

More detailed information about the relationship between the language, runtime and framework versions is available on the C# in Depth site. This includes information about which features of C# 3.0 you can use when targeting .NET 2.0. (If anyone wants to bring all of the content into this wiki answer, they're welcome to.)

这篇关于什么是C#的正确版本号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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