GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing learn.microsoft.com — The history of C# Note Access to this page requires authorization. You can try signing in or changing directories. Access to this page requires authorization. You can try changing directories. The history of C#This article provides a history of each major release of the C# language. The C# team is continuing to innovate and add new features. Detailed language feature status, including features considered for upcoming releases can be found on the dotnet/roslyn repository on GitHub. To find when a particular feature was added to the language, consult the C# version history file in the Important The C# language relies on types and methods in what the C# specification defines as a standard library for some of the features. The .NET platform delivers those types and methods in a number of packages. One example is exception processing. Every C# version 14Released November 2025 C# 14 includes the following new features:
C# version 13Released November 2024 C# 13 includes the following new features:
C# version 12Released November 2023 The following features were added in C# 12:
And, Interceptors - was released as a Preview feature. Overall, C# 12 provides new features that make you more productive writing C# code. Syntax you already knew is available in more places. Other syntax enables consistency for related concepts. C# version 11Released November 2022 The following features were added in C# 11:
C# 11 introduces generic math and several features that support that goal. You can write numeric algorithms once for all number types. There's more features to make working with C# version 10Released November 2021 C# 10 adds the following features and enhancements to the C# language:
C# 10 continues work on themes of removing ceremony, separating data from algorithms, and improved performance for the .NET Runtime. Many of the features mean you type less code to express the same concepts. Record structs synthesize many of the same methods that record classes do. Structs and anonymous types support with expressions. Global using directives and file scoped namespace declarations mean you express dependencies and namespace organization more clearly. Lambda improvements make it easier to declare lambda expressions where they're used. New property patterns and deconstruction improvements create more concise code. The new interpolated string handlers and C# 10 also marks more of a shift to the yearly cadence for .NET releases. Because not every feature can be completed in a yearly timeframe, you can try a couple of "preview" features in C# 10. Both generic attributes and static abstract members in interfaces can be used, but these preview features might change before their final release. C# version 9Released November 2020 C# 9 was released with .NET 5. It's the default language version for any assembly that targets the .NET 5 release. It contains the following new and enhanced features:
C# 9 continues three of the themes from previous releases: removing ceremony, separating data from algorithms, and providing more patterns in more places. Top level statements means your main program is simpler to read. There's less need for ceremony: a namespace, a The introduction of The pattern matching capabilities expanded in several ways. Numeric types now support range patterns. Patterns can be combined using C# 9 includes new pattern matching improvements:
These patterns enrich the syntax for patterns. One of the most common uses is a new syntax for a null check:
Any of these patterns can be used in any context where patterns are allowed: Another set of features supports high-performance computing in C#:
Performance and interopAnother set of improvements supports scenarios where code generators add functionality:
Fit and finish featuresC# 9 adds many other small features that improve developer productivity, both writing and reading code:
The C# 9 release continues the work to keep C# a modern, general-purpose programming language. Features continue to support modern workloads and application types. C# version 8.0Released September 2019 C# 8.0 is the first major C# release that specifically targets .NET Core. Some features rely on new Common Language Runtime (CLR) capabilities, others on library types added only in .NET Core. C# 8.0 adds the following features and enhancements to the C# language:
Default interface members require enhancements in the CLR. Those features were added in the CLR for .NET Core 3.0. Ranges, indexes, and asynchronous streams require new types in the .NET Core 3.0 libraries. Nullable reference types, while implemented in the compiler, is much more useful when libraries are annotated to provide semantic information regarding the null state of arguments and return values. Those annotations are being added in the .NET Core libraries. C# version 7.3Released May 2018 There are two main themes to the C# 7.3 release. One theme provides features that enable safe code to be as performant as unsafe code. The second theme provides incremental improvements to existing features. New compiler options were also added in this release. The following new features support the theme of better performance for safe code:
The following enhancements were made to existing features:
The new compiler options are:
C# version 7.2Released November 2017 C# 7.2 added several small language features:
C# version 7.1Released August 2017 C# started releasing point releases with C# 7.1. This version added the language version selection configuration element, three new language features, and new compiler behavior. The new language features in this release are:
Finally, the compiler has two options C# version 7.0Released March 2017 C# version 7.0 was released with Visual Studio 2017. This version has some evolutionary and cool stuff in the vein of C# 6.0. Here are some of the new features:
Other features included: All of these features offer new capabilities for developers and the opportunity to write cleaner code than ever. A highlight is condensing the declaration of variables to use with the C# version 6.0Released July 2015 Version 6.0, released with Visual Studio 2015, released many smaller features that made C# programming more productive. Here are some of them:
Other new features include:
If you look at these features together, you see an interesting pattern. In this version, C# started to eliminate language boilerplate to make code more terse and readable. So for fans of clean, simple code, this language version was a huge win. They did one other thing along with this version, though it's not a traditional language feature in itself. They released Roslyn the compiler as a service. The C# compiler is now written in C#, and you can use the compiler as part of your programming efforts. C# version 5.0Released August 2012 C# version 5.0, released with Visual Studio 2012, was a focused version of the language. Nearly all of the effort for that version went into another groundbreaking language concept: the The caller info attribute lets you easily retrieve information about the context in which you're running without resorting to a ton of boilerplate reflection code. It has many uses in diagnostics and logging tasks. But C# version 4.0Released April 2010 C# version 4.0, released with Visual Studio 2010, introduced some interesting new features: Embedded interop types eased the deployment pain of creating COM interop assemblies for your application. Generic covariance and contravariance give you more power to use generics, but they're a bit academic and probably most appreciated by framework and library authors. Named and optional parameters let you eliminate many method overloads and provide convenience. But none of those features are exactly paradigm altering. The major feature was the introduction of the Dynamic binding gives you the potential for errors but also great power within the language. C# version 3.0Released November 2007 C# version 3.0 came in late 2007, along with Visual Studio 2008, though the full boat of language features would actually come with .NET Framework version 3.5. This version marked a major change in the growth of C#. It established C# as a truly formidable programming language. Let's take a look at some major features in this version:
In retrospect, many of these features seem both inevitable and inseparable. They all fit together strategically. This C# version's killer feature was the query expression, also known as Language-Integrated Query (LINQ). A more nuanced view examines expression trees, lambda expressions, and anonymous types as the foundation upon which LINQ is constructed. But, in either case, C# 3.0 presented a revolutionary concept. C# 3.0 began to lay the groundwork for turning C# into a hybrid Object-Oriented / Functional language. Specifically, you could now write SQL-style, declarative queries to perform operations on collections, among other things. Instead of writing a C# version 2.0Released November 2005 Let's take a look at some major features of C# 2.0, released in 2005, along with Visual Studio 2005:
Other C# 2.0 features added capabilities to existing features:
While C# began as a generic Object-Oriented (OO) language, C# version 2.0 changed that in a hurry. With generics, types and methods can operate on an arbitrary type while still retaining type safety. For instance, having a List<T> lets you have C# version 2.0 brought iterators. To put it succinctly, iterators let you examine all the items in a C# version 1.2Released April 2003 C# version 1.2 shipped with Visual Studio .NET 2003. It contained a few small enhancements to the language. Most notable is that starting with this version, the code generated in a C# version 1.0Released January 2002 When you go back and look, C# version 1.0, released with Visual Studio .NET 2002, looked a lot like Java. As part of its stated design goals for ECMA, it sought to be a "simple, modern, general-purpose object-oriented language." At the time, looking like Java meant it achieved those early design goals. But if you look back on C# 1.0 now, you'd find yourself a little dizzy. It lacked the built-in async capabilities and some of the slick functionality around generics you take for granted. As a matter of fact, it lacked generics altogether. And LINQ? Not available yet. Those additions would take some years to come out. C# version 1.0 looked stripped of features, compared to today. You'd find yourself writing some verbose code. But yet, you have to start somewhere. C# version 1.0 was a viable alternative to Java on the Windows platform. The major features of C# 1.0 included:
Article originally published on the NDepend blog, courtesy of Erik Dietrich and Patrick Smacchia.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
FeedbackWas this page helpful? NoAdditional resources
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |