Kirtesh Shah
What are the new features of C# 10?

What are the new features of C# 10?

By Kirtesh Shah in .NET on Dec 07 2021
  • Pranam Bhat
    Dec, 2021 8

    I have listed the new feature’s available in C# 10. C# 10 has been released in the month of November 2021 and supports .NET 6.0 and Visual Studio 2022 version 17.0.

    1) Global and implicit usings
    2) Global using directives
    3) Implicit usings
    4) Combining using features
    5) File-scoped namespaces
    6) Improvements for lambda expressions and method groups
    7) Natural types for lambdas
    8) Natural types for method groups
    9) Return types for lambdas
    10) Attributes on lambdas
    11) Improvements to structs
    12) Parameterless struct constructors and field initializers
    13) record structs
    14) sealed modifier on ToString() in record classes
    15) with expressions on structs and anonymous types
    16) Interpolated string improvements
    17) Interpolated string handlers
    18) Constant interpolated strings
    19) Mix declarations and variables in deconstruction
    20) Improved definite assignment
    21) Extended property patterns
    22) Caller expression attribute

    For more detailed features, refer these websites:

    1) https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10
    2) https://www.c-sharpcorner.com/article/some-cool-features-in-c-sharp-10/

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS