# C# language version history: These are the [versions of C#][1] known about at the time of this writing: - **C# 1.0** released with .NET 1.0 and VS2002 (January 2002) - **C# 1.2** (bizarrely enough); released with .NET 1.1 and VS2003 (April 2003). First version to call `Dispose` on `IEnumerator`s which implemented `IDisposable`. A few other small features. - **C# 2.0** released with .NET 2.0 and VS2005 (November 2005). Major new features: generics, anonymous methods, nullable types, and iterator blocks - **C# 3.0** released with .NET 3.5 and VS2008 (November 2007). Major new features: lambda expressions, extension methods, expression trees, anonymous types, implicit typing (`var`), and query expressions - **C# 4.0** released with .NET 4 and VS2010 (April 2010). Major new features: late binding (`dynamic`), delegate and interface generic variance, more [COM][2] support, named arguments, tuple data type and optional parameters - **C# 5.0** released with .NET 4.5 and VS2012 (August 2012). [Major features][3]: async programming, and caller info attributes. Breaking change: [loop variable closure][4]. - **C# 6.0** released with .NET 4.6 and VS2015 (July 2015). Implemented by [Roslyn][5]. [Features][6]: initializers for automatically implemented properties, using directives to import static members, exception filters, element initializers, `await` in `catch` and `finally`, extension `Add` methods in collection initializers. - **C# 7.0** released with .NET 4.7 and VS2017 (March 2017). Major [new features][7]: [tuples][8], [ref locals and ref return][9], [pattern matching][10] (including pattern-based switch statements), [inline `out` parameter declarations][11], [local functions][12], [binary literals, digit separators][13], and [arbitrary async returns][14]. - **C# 7.1** released with VS2017 v15.3 (August 2017) New features: [async main][15], [tuple member name inference][16], [default expression][17], and [pattern matching with generics][18]. - **C# 7.2** released with VS2017 v15.5 (November 2017) New features: [private protected access modifier][19], [Span<T>, aka interior pointer, aka stackonly struct][20], and [everything else][21]. - **C# 7.3** released with VS2017 v15.7 (May 2018). New features: [enum, delegate and `unmanaged` generic type constraints][22]. `ref` reassignment. Unsafe improvements: `stackalloc` initialization, unpinned indexed `fixed` buffers, custom `fixed` statements. Improved overloading resolution. Expression variables in initializers and queries. `==` and `!=` defined for tuples. Auto-properties' backing fields can now be targeted by attributes. - **C# 8.0** released with .NET Core 3.0 and VS2019 v16.3 (September 2019). Major [new features][23]: [nullable reference-types][24], [Asynchronous streams][25], [Indices and Ranges][26], [Readonly members][27], [using declarations][28], [default interface methods][29], [Static local functions][30], and [Enhancement of interpolated verbatim strings][31]. - **C# 9.0** released with [.NET 5.0][32] and VS2019 v16.8 (November 2020). Major [new features][33]: [init-only properties][34], [records][35], [with-expressions][36], data classes, positional records, [top-level programs][37], [improved pattern matching][38] (simple type patterns, relational patterns, logical patterns), improved target typing (target-type `new` expressions, target typed `??` and `?`), and covariant returns. Minor features: relax ordering of `ref` and `partial` modifiers, parameter null checking, lambda discard parameters, native `int`s, attributes on local functions, function pointers, static lambdas, extension `GetEnumerator`, module initializers, and extending partial. ## In response to the OP's question: > What are the correct version numbers for C#? What came out when? Why can't I find any answers about C# 3.5? There is no such thing as C# 3.5 - the cause of confusion here is that the C# 3.0 is present in .NET 3.5. The language and framework are versioned independently, however - as is the CLR, which is at version 2.0 for .NET 2.0 through 3.5, .NET 4 introducing CLR 4.0, service packs notwithstanding. The CLR in .NET 4.5 has various improvements, but the versioning is unclear: in some places it may be referred to as CLR 4.5 ([this MSDN page][39] used to refer to it that way, for example), but the [`Environment.Version`][40] property still reports 4.0.xxx. As of May 3, 2017, the C# Language Team created a history of C# versions and features on their GitHub repository: [Features Added in C# Language Versions][41]. There is also [a page that tracks upcoming and recently implemented language features][42]. [1]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history [2]: https://en.wikipedia.org/wiki/Component_Object_Model [3]: https://devblogs.microsoft.com/csharpfaq/visual-studio-11-beta-is-here/ [4]: https://ericlippert.com/2009/11/16/closing-over-the-loop-variable-considered-harmful-part-two/ [5]: https://github.com/dotnet/roslyn [6]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-6 [7]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7 [8]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#tuples [9]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#ref-locals-and-returns [10]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#pattern-matching [11]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#out-variables [12]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#local-functions [13]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#numeric-literal-syntax-improvements [14]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#generalized-async-return-types [15]: https://github.com/dotnet/csharplang/issues/97 [16]: https://github.com/dotnet/csharplang/issues/415 [17]: https://github.com/dotnet/csharplang/issues/102 [18]: https://github.com/dotnet/csharplang/issues/154 [19]: https://github.com/dotnet/csharplang/issues/37 [20]: https://github.com/dotnet/csharplang/issues/666 [21]: https://github.com/dotnet/csharplang/milestone/6 [22]: https://devblogs.microsoft.com/premier-developer/dissecting-new-generics-constraints-in-c-7-3/ [23]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8 [24]: https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references [25]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#asynchronous-streams [26]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#indices-and-ranges [27]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#readonly-members [28]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#using-declarations [29]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#default-interface-methods [30]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#static-local-functions [31]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#enhancement-of-interpolated-verbatim-strings [32]: https://devblogs.microsoft.com/dotnet/announcing-net-5-0/ [33]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9 [34]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#init-only-setters [35]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#record-types [36]: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/with-expression [37]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#top-level-statements [38]: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#pattern-matching-enhancements [39]: https://msdn.microsoft.com/en-us/library/bb822049.aspx [40]: https://learn.microsoft.com/en-us/dotnet/api/system.environment.version [41]: https://github.com/dotnet/csharplang/blob/master/Language-Version-History.md [42]: https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md