Showing the best features of C# 9 and 10, including the changes for nullable reference types since C# 8, records with classes and structs, top level statements with the enhancements for file-scoped namespaces, global using directives, and implicit usings, as well as source code generators including the JSON serializer source generator that comes with .NET 6
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
C# 9 and 10 - What's cool?
1. C# 9 und 10 – What’s cool?
Christian Nagel
https://csharp.christiannagel.com
2. Christian Nagel
• Training
• Coaching
• Consulting
• Development
• Microsoft MVP
• www.cninnovation.com
• csharp.christiannagel.com
• @christiannagel
20. C# 9
• Records
• Init-only setters
• Top-level statements
• Covariant return types
• Target-typed new expressions
• Pattern matching enhancements
• Static anonymous functions
• Attributes on local functions
• Extension GetEnumerator
• Lambda discard parameters
• Native sized integers
• Function pointers
• Module initializers
• Extensions for partial methods
• Source code generators
• Generic constraint changes for nullability
21. C# 10
• global using directives
• file-scoped namespaces
• Custom parameterless constructors with
structs
• Field and property initializers with structs
• with expression with structs
• record struct
• Lambda improvements (attributes, natural
delegate type)
• Extended property patterns
• Const interpolated strings
• Record types can seal ToString
• Assignment and declaration in the same
deconstruction
• Generic Attributes
• Templates change with new language
features and nullability
• Implicit Usings
• Static abstract members in interfaces
(preview)