What are the correct version numbers for C#?

前端 未结 12 1867
小蘑菇
小蘑菇 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 00:56

    Version     .NET Framework  Visual Studio   Important Features
    C# 1.0  .NET Framework 1.0/1.1  Visual Studio .NET 2002     
    
        Basic features
    
    C# 2.0  .NET Framework 2.0  Visual Studio 2005  
    
        Generics
        Partial types
        Anonymous methods
        Iterators
        Nullable types
        Private setters (properties)
        Method group conversions (delegates)
        Covariance and Contra-variance
        Static classes
    
    C# 3.0  .NET Framework 3.0\3.5  Visual Studio 2008  
    
        Implicitly typed local variables
        Object and collection initializers
        Auto-Implemented properties
        Anonymous types
        Extension methods
        Query expressions
        Lambda expressions
        Expression trees
        Partial Methods
    
    C# 4.0  .NET Framework 4.0  Visual Studio 2010  
    
        Dynamic binding (late binding)
        Named and optional arguments
        Generic co- and contravariance
        Embedded interop types
    
    C# 5.0  .NET Framework 4.5  Visual Studio 2012/2013     
    
        Async features
        Caller information
    
    C# 6.0  .NET Framework 4.6  Visual Studio 2013/2015     
    
        Expression Bodied Methods
        Auto-property initializer
        nameof Expression
        Primary constructor
        Await in catch block
        Exception Filter
        String Interpolation
    
    C# 7.0  .NET Core 2.0   Visual Studio 2017  
    
        out variables
        Tuples
        Discards
        Pattern Matching
        Local functions
        Generalized async return types
        Numeric literal syntax improvements
    C# 8.0  .NET Core 3.0   Visual Studio 2019  
    
        
        Readonly members
        Default interface methods
        Pattern matching enhancements:
            Switch expressions
            Property patterns
            Tuple patterns
            Positional patterns
        Using declarations
        Static local functions
        Disposable ref structs
        Nullable reference types
        Asynchronous streams
        Asynchronous disposable
        Indices and ranges
        Null-coalescing assignment
        Unmanaged constructed types
        Stackalloc in nested expressions
        Enhancement of interpolated verbatim strings
    

提交回复
热议问题