/CSharp-Features

Session on "new" C# features

Primary LanguageC#

Evolution of C# Features

  1. String interpolation and literals
  2. Pattern matching
  3. Null safety
    • Nullable value types (C#2)
  4. Object construction
    • Object initializers (C#3)
    • Anonymous
    • Auto properties (C#6)
    • Expression bodied readonly properties (C#7)
    • Tuples (C#7)
    • init accessor (C#9)
    • required properties (C#11)
    • Primary constructors (C#12)
    • field backed properties (C#13)
  5. Records and immutability
    • Records (C#9)
    • Record structs (C#10)
  6. Collections
    • Collection initializers (C#3)
    • Implicit indexers in Object initializers (C#13)
    • Params collection (C#13)
  7. Concurrency
  8. Other
    • Anonymous functions (C#2)
    • Lambda expressions (C#3)
    • partial members (C#3)
    • Exception handlers => (when) (C#6)
    • default literal (C#7)
    • Interface default methods (C#8)
    • file scoped namespace and using declarations (C#10)