- Raw string literals
- Generic math support
- Static virtual memebers in interfaces
- Generic attributes
- UTF-8 string literals
- Newlines in string interpolation expressions
- List patterns
- File-local types - potentially faster source generation - source generator doesn't need to search for unused names, can just use "file" keyword
- Required members
- Auto-default structs
- Pattern match Span on a constant string
- Extended nameof scope
- Numeric IntPtr
- ref fields and scoped ref
- Improved method group conversion to delegate
- Global usings
- File Scoped Namespaces
- Constant Interpolated strings
- Lambda improvements
- Extended property patterns
- Record structs
- Records seal ToString()
- Improvements of structure types
- Allow both assignment and declaration in the same deconstruction
- Interpolated string handlers
- Improved definite assignment - more accurate warnings for definite assignment, e.g.:
string representation = "N/A";
if ((c != null && c.GetDependentValue(out object obj)) == true)
{
representation = obj.ToString(); // undesired error
}
- Allow AsyncMethodBuilder attribute on methods - Read about it more later on, code example
- Top-level statements - remove all the unnecessary clutter from the applications, see Top level statements,
- Init setters
- Known Object Type Shorthand Instantation
- Relational pattern matching
- Logical pattern matching
- Is not null
- Records