Skip to main content

Appendix C - C# Version Features

This appendix provides a comprehensive index of C# features organized by version, with links to the relevant sections in the documentation where each feature is covered in detail.

C# 8.0 (2019)

FeatureDescriptionDocumentation Link
Readonly MembersAdd readonly modifier to struct membersSection 3.4.3 - Readonly Fields
Default Interface MethodsInterfaces can now have method implementationsSection 3.5.5 - Default Interface Methods (C# 8+)
Pattern Matching EnhancementsSwitch expressions, property patterns, tuple patternsSection 7.2.9 - Pattern Matching Enhancements (C# 9+)
Using DeclarationsSimplified using statement without bracesSection 7.1.5 - Using using Statements
Static Local FunctionsLocal functions that can't capture local variablesSection 3.1.4 - Methods and Parameters
Nullable Reference TypesExplicit annotation for nullable referencesSection 2.3.2.4 - Nullable Type Conversions
Asynchronous StreamsIAsyncEnumerable&lt;T&gt; for async iterationSection 7.3.7 - Asynchronous Streams with IAsyncEnumerable<T>
Indices and RangesNew syntax for accessing arrays and collectionsSection 2.5.4.1 - System.Array Methods

C# 9.0 (2020)

FeatureDescriptionDocumentation Link
Record TypesReference types with value-based equalitySection 7.2.11 - Record Types (C# 9+)
Init-only PropertiesProperties that can only be set during initializationSection 7.2.10 - Init-only Properties (C# 9+)
Top-level StatementsCode without explicit Program class and Main methodSection 2.1.1 - C# Language Characteristics
Pattern Matching EnhancementsType patterns, relational patterns, logical patternsSection 7.2.9 - Pattern Matching Enhancements (C# 9+)
Target-typed New ExpressionsOmit type in object creation when type is knownSection 3.1.2 - Creating and Using Objects
Covariant Return TypesOverride methods can return more derived typesSection 3.6.6 - Covariance and Contravariance
Extension GetEnumeratorforeach can use extension GetEnumerator methodsSection 3.6.2 - Extension Methods
Lambda Discard ParametersUse _ for unused lambda parametersSection 7.2.2 - Lambda Expressions
Native Integersnint and nuint types for platform-specific integersSection 2.2.1 - Simple Types

C# 10.0 (2021)

FeatureDescriptionDocumentation Link
Record StructsValue type recordsSection 7.2.11.2 - Record Classes vs. Record Structs (C# 10+)
Global Using DirectivesImport namespaces for all filesSection 7.2.12 - Global Using Directives (C# 10+)
File-scoped NamespacesSimplified namespace declarationsSection 7.2.13 - File-scoped Namespaces (C# 10+)
Extended Property PatternsNested property patternsSection 7.2.9 - Pattern Matching Enhancements (C# 9+)
Constant Interpolated Stringsconst strings with interpolationSection 4.4.4 - String Interpolation
Lambda ImprovementsNatural type for lambdas, attributesSection 7.2.2 - Lambda Expressions
DateOnly and TimeOnlyDate and time without the overhead of DateTimeSection 4.6.5 - DateOnly and TimeOnly (C# 10+)

C# 11.0 (2022)

FeatureDescriptionDocumentation Link
Required MembersProperties that must be initializedSection 7.2.14 - Required Members (C# 11+)
Raw String LiteralsMulti-line strings with improved formattingSection 7.2.15 - Raw String Literals (C# 11+)
List PatternsPattern matching with lists and arraysSection 7.2.9.5 - List Patterns (C# 11+)
Auto-Default StructsStructs can be created without initializing all fieldsSection 2.2.2 - Complex Types
Generic AttributesAttributes can have type parametersSection 7.2.3 - Reflection and Attributes
UTF-8 String LiteralsString literals with UTF-8 encodingSection 4.4.1 - String Creation and Manipulation
Pattern Matching on ReadOnlySpanUse patterns with spansSection 7.2.9 - Pattern Matching Enhancements (C# 9+)

C# 12.0 (2023)

FeatureDescriptionDocumentation Link
Primary ConstructorsConstructor parameters in class declarationSection 7.2.17 - Primary Constructors (C# 12+)
Collection ExpressionsSimplified collection initializationSection 7.2.16 - Collection Expressions (C# 12+)
Inline ArraysFixed-size arrays as value typesSection 2.5.1.1 - Definition and Declaration
Optional Parameters in Lambda ExpressionsDefault values for lambda parametersSection 7.2.2 - Lambda Expressions
ref readonly ParametersParameters that are references but can't be modifiedSection 3.1.4 - Methods and Parameters
Alias Any Typeusing directive can alias any typeSection 2.1.1 - C# Language Characteristics

C# 13.0 (2024)

FeatureDescriptionDocumentation Link
InterceptorsIntercept method calls at compile timeSection 7.2.18 - Interceptors (C# 13)
Collection Expressions EnhancementsMore collection types supportSection 7.2.16 - Collection Expressions (C# 12+)
Semi-auto PropertiesProperties with custom backing fieldsSection 3.1.8 - Properties with Backing Fields
params CollectionsSupport for params with collection types beyond arraysSection 7.2.19 - Params Collections (C# 13)
New lock Type and SemanticsEnhanced thread synchronization with System.Threading.LockSection 7.3.10 - Thread Synchronization with Lock Type (C# 13+)
Partial Properties and IndexersSupport for partial properties and indexers in partial typesSection 3.1.14 - Partial Members (C# 13+)
ref struct InterfacesAllow ref struct types to implement interfacesSection 3.5.6 - Ref Struct Interfaces (C# 13+)
field KeywordAccess synthesized backing fields in property accessorsSection 3.1.8 - Properties with Backing Fields

C# 14.0 (2025)

FeatureDescriptionDocumentation Link
Extension MembersEnhanced extension methods and new extension propertiesSection 7.2.20 - Extension Members (C# 14)
Null-conditional AssignmentUse null-conditional operators on the left side of assignmentsSection 7.2.21 - Null-conditional Assignment (C# 14)
nameof with Unbound Generic TypesUse nameof with open generic typesSection 7.2.22 - Nameof Enhancements (C# 14)
Implicit Span<T> ConversionsMore implicit conversions for Span<T> and ReadOnlySpan<T>Section 7.2.23 - Span Conversions (C# 14)
Lambda Parameters with ModifiersAdd modifiers to lambda parameters without specifying typesSection 7.2.2 - Lambda Expressions
field Backed PropertiesUse field keyword to access synthesized backing fieldsSection 3.1.8 - Properties with Backing Fields
Partial Events and ConstructorsSupport for partial events and constructors in partial typesSection 3.1.14.3 - Partial Events and Constructors (C# 14+)

Evolution of C# Features

Object-Oriented Programming

The evolution of object-oriented features in C#:

  1. C# 8.0: Default interface methods, readonly members
  2. C# 9.0: Records, init-only properties, covariant return types
  3. C# 10.0: Record structs, parameterless struct constructors
  4. C# 11.0: Required members, auto-default structs
  5. C# 12.0: Primary constructors
  6. C# 13.0: Semi-auto properties, partial properties and indexers, ref struct interfaces
  7. C# 14.0: Extension properties, field backed properties, partial events and constructors

Functional Programming

The evolution of functional programming features in C#:

  1. C# 8.0: Enhanced pattern matching, using declarations
  2. C# 9.0: Top-level statements, improved pattern matching
  3. C# 10.0: Lambda improvements, extended property patterns
  4. C# 11.0: List patterns
  5. C# 12.0: Collection expressions
  6. C# 13.0: Interceptors, params collections
  7. C# 14.0: Extension members, null-conditional assignment, lambda parameters with modifiers

Asynchronous Programming

The evolution of asynchronous programming features in C#:

  1. C# 5.0: async/await
  2. C# 8.0: Asynchronous streams (IAsyncEnumerable<T>)
  3. C# 9.0: Improved async pattern matching
  4. C# 10.0: AsyncMethodBuilder override
  5. C# 13.0: Ref locals and unsafe contexts in async methods

For developers new to C#, we recommend learning the features in this order:

  1. Core Language Features (C# 1-5): Classes, methods, properties, generics, LINQ, async/await
  2. Modern Syntax Improvements (C# 6-8): String interpolation, null-conditional operators, pattern matching
  3. Immutability Features (C# 9+): Records, init-only properties, required members
  4. Latest Productivity Features (C# 10-12): Global usings, file-scoped namespaces, primary constructors, collection expressions
  5. Advanced Language Features (C# 13-14): Interceptors, extension members, params collections, field keyword

Further Resources