The C# programming language was first released by Microsoft in 2002 along with the new .NET Framework 1.0 and Visual Studio.NET 2002. Currently, it stands as the seventh most used programming language in the world. (source: StackOverflow 2019 survey ). In this blog post, we will look into the released C# version history from its initial release version and list down the features and enhancements that have been added over subsequent releases.
Over the period Microsoft has added a ton of features to make the C# programming language a real general-purpose language using which the developer can build applications like a simple console application, desktop application, Web application, service application, and even new generation Internet of Things (IoT) applications and many more.
C# Version History
At the time of writing the current version of C# is 9.0, and the framework version is .NET 5.0.
|C# Version||.NET Framework||CLR |
|Major Features and Enhancement|
|C# 1.0||1.0||1.0||Class, Structs, Interfaces, Events, Properties, Delegates, Expressions, Statements, Attributes, Literals|
|C# 1.2||1.1||1.1||Enhancements and call of Dispose on an IEnumerator for-each call.|
|C# 2.0||2.0||2.0||Generics, Partial types, Anonymous Methods, Iterators, Nullable types, Getter/Setter separate accessibility, Delegates, Static classes, Delegate inference.|
|C# 3.0||3.5||2.0||Implicitly typed local variables, Object and collection initializers, Auto-Implemented properties, Anonymous types, Extension methods, Query expressions, Lambda expressions, Expression trees, Partial methods.|
|C# 4.0||4.0||4.0||Dynamic binding, Named and optional arguments, Covariance and Contravariance for generic delegate and interfaces, Embedded interop types (NoPIA)|
|C# 5.0||4.5||4.0||Asynchronous methods support and Caller info attributes.|
|C# 6.0||4.6||4.0||Complier-as-a-Service (Roslyn), Import of static type members into the namespace, Exception filters, Await in catch/finally blocks, Auto property initializer, the default value for a property getter, Expression-bodied members, Null propagator (Null-conditional operator, succinct null checking), string interpolation, new nameof operator and Dictionary initializers.|
|C# 7.0||4.6.2||4.0||Out variables ,Pattern matching ,Tuples ,Deconstruction ,Discards ,Local Functions ,Binary Literals ,Digit Separators ,Ref returns and locals ,Generalized async return types ,More expression-bodied members ,Throw expressions|
|C# 7.1||4.7||4.0||Async main ,Default expressions ,Reference assemblies ,Inferred tuple element names ,Pattern-matching with generics|
|C# 7.2||4.7.1||4.0||Span and ref-like types, In parameters and readonly references, Ref conditional, Non-trailing named arguments, Private protected accessibility, Digit separator after base specifier|
|C# 7.3||4.7.2||4.0||System.Enum, System.Delegate and unmanaged constraints, Ref local re-assignment, Stackalloc initializers, Indexing movable fixed buffers, Custom fixed statement, Improved overload candidates, Expression variables in initializers and queries, Tuple comparison, Attributes on backing fields|
|C# 8.0||4.8||4.0||Nullable reference types, default interface members, recursive patterns, async streams, additional using usage, range, and indexes, null-coalescing assignment, static local functions, unmanaged generic structs, readonly members, stackalloc in nested contexts, alternative interpolated verbatim strings support, and Obsolete on attribute accessors.|
|C# 9.0||5.0||5.0||Records, Init only setters, Top-level statements, Pattern matching enhancements, Native sized integers, Function pointers, Suppress emitting localsinit flag, Target-typed new expressions, static anonymous functions, Target-typed conditional expressions, Covariant return types, Extension GetEnumerator support for foreach loops, Lambda discard parameters, Attributes on local functions, Module initializers, New features for partial methods|
All of the above features have enhanced the C# programming language to a great extent and made it very easy for the developer to write cleaner code. Microsoft with the introduction of the .NET Core has made it possible to use the C# language without worrying about the platform the application will execute in. Applications of different types can be created that can work without issue on a variety of platforms like Linux, macOS, and various devices.
The Microsoft C# Language Design Team (LDT) designs the language and accepts proposals for the language. If you have a great idea about the language or want to take a look at what the LDT team is working on, you can check the “C# Language Proposals” present on the GitHub page.
To download the latest .NET Framework or the .NET Core please click here and if you want to download Visual Studio Community Edition, please click here.
This concludes the blog post on C# version history, I hope you found this post helpful, thanks for visiting, Cheer!!!
[Further Readings: Microsoft .NET Core Versions History | Microsoft .NET Framework Version History | Introduction to WPF in .NET Core | Useful Visual Studio 2019 extensions for database projects | Machine Learning Model Generation | Important Global Visual Studio 2019 Shortcuts | Datasets for Machine Learning | Top 7 Must-Have Visual Studio 2019 Extensions | AI vs ML vs DL – The basic differences | ASP.NET Core Blazor Server Application Project Structure | ASP.NET Core – Blazor Application an Introduction | Top 5 Machine Learning Frameworks to learn in 2020 | Visual Studio 2019 Output Window | Visual Studio 2019 Code Navigation (Ctrl+T) ]