Skip to content

C# Versions & Features

C# is a modern, object-oriented programming language developed by Microsoft. Over the years, multiple versions have been released, each introducing new features to enhance productivity and performance. Below is a version-wise breakdown of major features introduced in each C# release.

  • First release with basic OOP concepts
  • Classes, structs, interfaces, and inheritance
  • Value types and reference types
  • Garbage Collection (GC)
  • Generics for type-safe collections
  • Partial classes to split a class definition across multiple files
  • Nullable types (int?, double?)
  • Iterator methods (yield return)
  • LINQ (Language Integrated Query)
  • Lambda expressions
  • Automatic properties
  • Anonymous types
  • Extension methods
  • Dynamic binding (dynamic keyword)
  • Named and optional parameters
  • Covariance and contravariance
  • Async and Await for asynchronous programming
  • Caller information attributes (CallerMemberName, CallerFilePath)
  • Expression-bodied members
  • Null-conditional operator (?.)
  • String interpolation ($"{variable}")
  • Using static imports
  • Tuples and deconstruction
  • Pattern matching
  • Local functions
  • Out variable declaration
  • Async Main method (async Task Main)
  • Default literal expressions (default)
  • Inferred tuple element names
  • Pattern matching with generics
  • Non-trailing named arguments
  • Leading underscores in numeric literals
  • private protected access modifier
  • in parameters for readonly reference
  • Enhanced generic constraints
  • Tuple comparison
  • Stackalloc in nested expressions
  • Ref local re-assignment
  • Nullable reference types
  • Async streams (await foreach)
  • Default interface methods
  • Ranges and indices (.. operator)
  • Record types (record keyword)
  • Init-only properties (init)
  • Top-level statements
  • Enhanced pattern matching
  • File-scoped namespaces
  • Extended with expressions
  • Constant interpolated strings
  • Improved lambda expressions
  • Raw string literals
  • Required members (required keyword)
  • Generic attributes
  • UTF-8 string literals
  • Primary constructors for non-record types
  • Collection expressions
  • Alias directives (using alias = namespace;)
  • Enhanced params Collections
  • New Lock Object
  • New Escape Sequence (\e)
  • Method Group Natural Type Improvements
  • Implicit Index Access in Object Initializers
  • Support for ref Locals and unsafe Contexts in Iterators and Async Methods
  • ref struct Types Implementing Interfaces
  • Allowing ref struct Types as Generic Type Arguments
  • Partial Properties and Indexers
  • Overload Resolution Priority Attribute
  • Upcoming Feature 1 (will be updated soon)
  • Upcoming Feature 2 (will be updated soon)
  • Upcoming Feature 3 (will be updated soon)
  • Upcoming Feature 4 (will be updated soon)

Each C# version introduces features that improve efficiency, readability, and maintainability. Understanding these enhancements helps developers leverage the latest capabilities of the language.


References: