What are the correct version numbers for C#?

前端 未结 12 1863
小蘑菇
小蘑菇 2020-11-22 00:48

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

This question is primarily to

相关标签:
12条回答
  • 2020-11-22 01:03

    C# 8.0 is the latest version of c#.it is supported only on .NET Core 3.x and newer versions. Many of the newest features require library and runtime features introduced in .NET Core 3.x

    The following table lists the target framework with version and their default C# version.

    Source - C# language versioning

    0 讨论(0)
  • 2020-11-22 01:10

    This is the same as most answers here, but tabularized for ease, and it has Visual Studio and .NET versions for completeness.

    ╔════════════╦════════════╦══════════════╦═════════════╦══════════════╗
    ║ C# version ║ VS version ║ .NET version ║ CLR version ║ Release date ║
    ╠════════════╬════════════╬══════════════╬═════════════╬══════════════╣
    ║    1.0     ║    2002    ║    1.0       ║     1.0     ║   Feb 2002   ║
    ║    1.2     ║    2003    ║    1.1       ║     1.1     ║   Apr 2003   ║
    ║    2.0     ║    2005    ║    2.0       ║     2.0     ║   Nov 2005   ║
    ║            ║            ║    3.0       ║     2.0     ║   Nov 2006   ║
    ║    3.0     ║    2008    ║    3.5       ║     2.0     ║   Nov 2007   ║
    ║    4.0     ║    2010    ║    4.0       ║     4       ║   Apr 2010   ║
    ║    5.0     ║    2012    ║    4.5       ║     4       ║   Aug 2012   ║
    ║    5.0     ║    2013    ║    4.5.1     ║     4       ║   Oct 2013   ║
    ║            ║            ║    4.5.2     ║     4       ║   May 2014   ║
    ║    6.0     ║    2015    ║    4.6       ║     4       ║   Jul 2015   ║
    ║            ║            ║    4.6.1     ║     4       ║   Nov 2015   ║
    ║            ║            ║    4.6.2     ║     4       ║   Aug 2016   ║
    ║    7.0     ║    2017    ║              ║             ║   Mar 2017   ║
    ║            ║            ║    4.7       ║     4       ║   May 2017   ║
    ║    7.1     ║ 2017(v15.3)║              ║             ║   Aug 2017   ║
    ║            ║            ║    4.7.1     ║     4       ║   Oct 2017   ║
    ║    7.2     ║ 2017(v15.5)║              ║             ║   Dec 2017   ║
    ║            ║            ║    4.7.2     ║     4       ║   Apr 2018   ║
    ║    7.3     ║ 2017(v15.7)║              ║             ║   May 2018   ║
    ║    8.0     ║    2019    ║    4.8       ║     4       ║   Apr 2019   ║
    ║    9.0     ║ 2019(v16.8)║    5.0^      ║     ^^      ║   Nov 2020   ║ 
    ╚════════════╩════════════╩══════════════╩═════════════╩══════════════╝
    

    ^ - .NET 5.0 is not a newer version of .NET framework but .NET Core 3. Starting from .NET 5.0, there are no newer versions of .NET full framework.

    ^^ - There are no separate CLR (CoreCLR) versions for .NET Core. Whatever is the .NET Core version is the CoreCLR version. So not mentioning it.


    Note: .NET development is pretty much independent of VS these days, there is no correlation between versions of each.
    Refer to ".NET Framework versions and dependencies" for more.

    0 讨论(0)
  • 2020-11-22 01:10

    The biggest problem when dealing with C#'s version numbers is the fact that it is not tied to a version of the .NET Framework, which it appears to be due to the synchronized releases between Visual Studio and the .NET Framework.

    The version of C# is actually bound to the compiler, not the framework. For instance, in Visual Studio 2008 you can write C# 3.0 and target .NET Framework 2.0, 3.0 and 3.5. The C# 3.0 nomenclature describes the version of the code syntax and supported features in the same way that ANSI C89, C90, C99 describe the code syntax/features for C.

    Take a look at Mono, and you will see that Mono 2.0 (mostly implemented version 2.0 of the .NET Framework from the ECMA specifications) supports the C# 3.0 syntax and features.

    0 讨论(0)
  • 2020-11-22 01:11

    I've summarised most of the versions in this table. The only ones missing should be ASP.NET Core versions. I've also added different versions of ASP.NET MVC.

    Note that ASP.NET 5 has been rebranded as ASP.NET Core 1.0 and ASP.NET MVC 6 has been rebranded as ASP.NET Core MVC 1.0.0. I believe this change occurred sometime around Jan 2016.

    I have included the release date of ASP.NET 5 RC1 in the table, but I've yet to include ASP.NET core 1.0 and other core versions, because I couldn't find the exact release dates. You can read more about the release dates regarding ASP.NET Core here: When is ASP.NET Core 1.0 (ASP.NET 5 / vNext) scheduled for release?

    0 讨论(0)
  • 2020-11-22 01:14

    VERSION_____LANGUAGE SPECIFICATION______MICROSOFT COMPILER

    C# 1.0/1.2____December 2001?/2003?___________January 2002?

    C# 2.0_______September 2005________________November 2005?

    C# 3.0_______May 2006_____________________November 2006?

    C# 4.0_______March 2009 (draft)______________April 2010?

    C# 5.0; released with .NET 4.5 in August 2012

    C# 6.0; released with .NET 4.6 2015

    C# 7.0; released with .NET 4.7 2017

    C# 8.0; released with .NET 4.8 2019

    0 讨论(0)
  • 2020-11-22 01:18
    • C# 1.0 with Visual Studio.NET

    • C# 2.0 with Visual Studio 2005

    • C# 3.0 with Visual Studio 2008

    • C# 4.0 with Visual Studio 2010

    • C# 5.0 with Visual Studio 2012

    • C# 6.0 with Visual Studio 2015

    • C# 7.0 with Visual Studio 2017

    • C# 8.0 with Visual Studio 2019

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