Awesome Open Source
Awesome Open Source


C# 8 Cheat Sheet with code example

Updated according to the Microsoft documentation:

  1. Default interface methods
  2. Nullable reference types
  3. Pattern matching enhancements
  4. Asynchronous streams
  5. Using declarations
  6. Enhancement of interpolated verbatim strings
  7. Null-coalescing assignment
  8. Static local functions
  9. Indices and ranges
  10. Unmanaged constructed types
  11. Readonly-Member
  12. Stackalloc in nested expressions
  13. 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:

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
csharp (1,121
programming-language (364
cheat (49
cheatsheets (41
cheat-sheet (16