C # Language history version features (C # 1.0 to C # 8.0 rollup)

Source: Internet
Author: User
Tags dotnet visual studio 2010

Historical version

C # as Microsoft 2000 later. NET platform development of the language, the development has been 17 years of history, the language itself has a wealth of characteristics, Microsoft's support for its update is also very supportive. Microsoft has submitted C # to the standard organization Ecma,c# 5.0 is currently the latest specification for ECMA release, C # 6.0 is a draft phase, and C # 7.1 is the latest specification that Microsoft is currently offering.

This is just an outline, because C # 5.0 is a version with the ECMA standard specification, so choose C # 5.0 as the major version and learn the new features of C # 6.0, 7.0.

C # Language Specification GitHub library See also: Https://github.com/dotnet/csharplang

C # language Roadmap and features in development see:
Https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md

language version Release Time . NET Framework Requirements Visual Studio Version
C # 1.0 2002.1 . NET Framework 1.0 Visual Studio. NET 2002
C # 1.1\1.2 2003.4 . NET Framework 1.1 Visual Studio. NET 2003
C # 2.0 2005.11 . NET Framework 2.0 Visual Studio 2005
C # 3.0 2007.11 . NET Framework 2.0\3.0\3.5 Visual Studio 2008
C # 4.0 2010.4 . NET Framework 4.0 Visual Studio 2010
C # 5.0 2012.8 . NET Framework 4.5 Visual Studio 2012\2013
C # 6.0 2015.7 . NET Framework 4.6 Visual Studio 2015
C # 7.0 2017.3 . NET Framework 4.6.2 Visual Studio 2017
C # 7.1 2017.6 . NET Framework Visual Studio v15.3 Preview version
C # 8.0 Pending release . NET Framework 4.7.1 Visual Studio v15.7
C # 1.0 Features

The 1th version, the most basic feature of the programming language.

    • Classes: Object-oriented features, supporting class types
    • STRUCTS: Structure
    • Interfaces: interface
    • Events: Event
    • Properties: A member of a class that provides a flexible way to access fields
    • Delegates: Delegate, a reference type that represents a reference to a method with a specific argument list and return type
    • Expressions,statements,operators: expressions, statements, operators
    • Attributes: An attribute that adds metadata or declarative information to a program code, which can be accessed by reflection at run time
    • Literals: literal (or understood as a constant value), distinguishing constants, constants are relative to variables
C # 2 features (VS 2005)
    • Generics: Generics
    • Partial types: Partial types, which can split type definitions of classes, structs, interfaces, etc. into multiple files
    • Anonymous methods: Anonymous method
    • Iterators: iterators
    • Nullable types: Nullable type, the class can be a different value, or null
    • Getter/setter Separate accessibility: Property access control
    • Method group conversions (delegates): Methods set conversions, which can represent a set of methods in a declaration delegate, implicitly invoking the
    • Co-and Contra-variance for delegates and interfaces: Covariance and contravariance of delegates, interfaces
    • Static classes: Statically class
    • Delegate inference: Delegate inference, allowing method names to be directly assigned to delegate variables
C # 3 features (VS 2008)
    • Implicitly typed Local variables:
    • Object and collection initializers: Objects and collection initializers
    • auto-implemented properties: Automatic attributes, automatic attribute generation method, more concise declaration
    • Anonymous types: Anonymous Type
    • Extension methods: Extension method
    • Query expressions: Querying expressions
    • Lambda EXPRESSION:LAMBDA Expression
    • Expression trees: Expressions tree, a tree-shaped data structure representing code, is a new type of data
    • Partial methods: Partial Methods
C # 4 features (VS 2010)
    • Dynamic binding: Dynamically bound
    • Named and optional arguments: named parameters and Optional parameters
    • Generic Co-and contravariance: Covariance and contravariance of generics
    • Embedded Interop Types ("Nopia"): Enables embedding type information to increase the neutrality of referencing COM component programs
C # 5 features (VS 2012)
    • Asynchronous methods: Async method
    • Caller Info attributes: Caller information attribute, Access caller's information when invoking
C # 6 features (VS 2015)
    • Compiler-as-a-service (Roslyn)
    • Import of static type member into namespace: supports only static members in the Import class
    • Exception Filters: Exception filter
    • Await in catch/finally blocks: supports using await statements in catch/finally statement blocks
    • Auto Property Initializers: Automatic attribute initialization
    • Default values for Getter-only properties: Set defaults for read-only attributes
    • Expression-bodied members: Support for member methods and read-only properties that are subject to an expression
    • Null propagator (null-conditional operator, succinct null checking): null condition operator
    • String interpolation: A new method for generating a specific format string by inserting strings
    • nameof operator:nameof operator, returns the name of the method, property, variable
    • Dictionary initializer: Dictionary initialization
C # 7 features (Visual Studio 2017)
    • Out variables:out variables are directly declared, for example, can be out-in parameter
    • Pattern matching: schema matching, distributed according to object type or other attribute implementation method
    • Tuples: Tuples
    • Deconstruction: meta-group parsing
    • Discards: No named variable, only placeholder, the following code does not need to use its value
    • Local Functions: Partial function
    • Binary literals: binary literal
    • Digit Separators: Number separator
    • REF returns and locals: reference return value and local variable
    • Generalized use of generic return types in Async return Types:async
    • More Expression-bodied members: Allows constructors, parsers, properties to use expressions as body
    • The Throw Expressions:throw can be used in an expression
C # 7.1 Features (Visual Studio version 15.3)
    • Async main: In the Main method in async mode
    • Default expressions: Introducing a new literal value default
    • Reference assemblies:
    • Inferred tuple element Names:
    • Pattern-matching with generics:
C # 8.0 Features (Visual Studio version 15.7)
    • Default Interface Methods Defaults interface implementation
    • Nullable reference typenullablereferencetypes non-null and controllable data types
    • Recursive patterns Recursive mode
    • Async streams Asynchronous Data flow
    • Caller expression attribute calling method expressions property
    • target-typed New
    • Generic attributes Common Properties
    • Ranges
    • Default in Deconstruction
    • Relax ordering of ref and partial modifiers

C # Language history version features (C # 1.0 to C # 8.0 rollup)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.