C# 8 Cheat Sheet with code example
Updated according to the Microsoft documentation: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8
- Default interface methods
- Nullable reference types
- Pattern matching enhancements
- Asynchronous streams
- Using declarations
- Enhancement of interpolated verbatim strings
- Null-coalescing assignment
- Static local functions
- Indices and ranges
- Unmanaged constructed types
- Readonly-Member
- Stackalloc in nested expressions
- Disposable ref structs
I will keep updating the cheat sheet. Please follow me and start it.
The following features are moved to C# 8.1, 8.2 and 8.x
- Caller expression attribute
- Target-typed new
- Generic attributes
- Default in deconstruction
- Relax ordering of ref and partial modifiers
The following feaures will coming in C# 8.0 MERGED -> To Master
- Default Interface Methods
- Nullable reference type
- Recursive patterns
- Async streams
- Enhanced using
- Ranges
- Null-coalescing Assignment
- Alternative interpolated verbatim strings
- stackalloc in nested contexts
- Unmanaged generic structs
- Static local functions
- Readonly members
About me: www.bassam.ml