- Classes
- Structs
- Interfaces
- Events
- Properties
- Delegates
- Operators and expressions
- Statements
- Attributes
- Generics
- Partial types
- Anonymous methods
- Nullable value types
- Iterators
- Covariance and contravariance
- Auto-implemented properties
- Anonymous types
- Query expressions
- Lambda expressions
- Expression trees
- Extension methods
- Implicitly typed local variables
- Partial methods
- Object and collection initializers
- Dynamic binding
- Named/optional arguments
- Generic covariant and contravariant
- Embedded interop types
- Asynchronous members
- Caller info attributes
- Static imports
- Exception filters
- Auto-property initializers
- Expression bodied members
- Null propagator
- String interpolation
- nameof operator
- Index initializers
- Out variables
- Tuples and deconstruction
- Pattern matching
- Local functions
- Expanded expression bodied members
- Ref locals and returns
Other features included:
- Discards
- Binary Literals and Digit Separators
- Throw expressions
- async Main method
- default literal expressions
- Inferred tuple element names
- Pattern matching on generic type parameters
- Techniques for writing safe efficient code
- Non-trailing named arguments
- Leading underscores in numeric literals
- private protected access modifier
- Conditional ref expressions
The following new features support the theme of better performance for safe code:
- You can access fixed fields without pinning.
- You can reassign ref local variables.
- You can use initializers on stackalloc arrays.
- You can use fixed statements with any type that supports a pattern.
- You can use additional generic constraints.
The following enhancements were made to existing features:
- You can test == and != with tuple types.
- You can use expression variables in more locations.
- You may attach attributes to the backing field of auto-implemented properties.
- Method resolution when arguments differ by in has been improved.
- Overload resolution now has fewer ambiguous cases.
The new compiler options are:
- -publicsign to enable Open Source Software (OSS) signing of assemblies.
- -pathmap to provide a mapping for source directories.
- 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
- Indices and ranges
- Null-coalescing assignment
- Unmanaged constructed types
- Stackalloc in nested expressions
- Enhancement of interpolated verbatim strings
Not yet released