C#
Microsoft’s statically typed, object-oriented language for .NET, which made async and await mainstream and gains a new version every November.
- What it is
- Programming languages (run on a virtual machine),Object-oriented programming
- Type
- Open source
- Made by
- Microsoft / .NET Foundation
- License
- MIT (Roslyn compiler)
- Facts checked
- 8 October 2026
What it is
The C# compiler (Roslyn) translates source code into common intermediate language (CIL), a CPU-independent instruction set, plus metadata that describes every type. At run time the .NET just-in-time compiler turns that CIL into native code for the machine, method by method, as it is first called. Memory is managed by the runtime’s garbage collector. Native AOT publishing can instead compile a whole app ahead of time to a self-contained executable, which starts faster but gives up dynamic loading and runtime code generation.
C# began in 2002 as a simple, object-oriented language that looked a lot like Java, and has borrowed widely since: generics in C# 2.0 (2005), LINQ queries and lambdas in 3.0 (2007), and async/await in C# 5.0 (2012). An async method returns a Task and can await other tasks; while it waits, the thread isn’t blocked and can do other work, and the compiler transforms the method so that it carries on when the task completes. Since 2020 a new version has shipped every November with .NET; C# 14 arrived in November 2025.
The language is standardized as ECMA-334 (first edition December 2001), and the compiler and runtime have been open source since 2014.
Why teams pick it
- Strong static typing: every variable’s type is known at compile time, so the compiler and editor catch misuse before the program runs
async/awaitmakes non-blocking code read like ordinary sequential code- LINQ gives one query syntax for in-memory collections, XML or JSON, and databases
- Generics are kept by the runtime, so
List<int>stores plain integers and type arguments are visible to reflection - JIT compilation by default, or Native AOT for faster startup, a smaller memory footprint and no installed runtime
Watch out for
- Native AOT apps can’t load assemblies dynamically or generate code at runtime, and need trimming, which some reflection-heavy libraries don’t support
- Calling a blocking method such as
Task.Wait()instead of awaiting blocks the current thread and throws away the benefit of async code
Alternatives
What all run on a virtual machine have in common →How it fits with other technologies
Two awaited calls that wait at the same time (a whole program with top-level statements) · csharp
async Task<int> GetPriceAsync(string item)
{
await Task.Delay(500); // stands in for a network call; the thread is free meanwhile
return item.Length * 10;
}
Task<int> tea = GetPriceAsync("tea");
Task<int> cake = GetPriceAsync("cake");
int[] prices = await Task.WhenAll(tea, cake); // both waits overlap: about 0.5 s in total
Console.WriteLine(string.Join(", ", prices)); // 30, 40See it in a real stack
No architecture uses C# yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2000–2025
In the late 1990s Microsoft started internal projects, partly in response to Java, that became the .NET platform and its main language. Anders Hejlsberg, who had written the compiler Borland sold as Turbo Pascal and led the team that designed Delphi, led the C# design team, which met in the same room, three days a week, for years.
Microsoft announced C# on June 26, 2000, as a modern, object-oriented language built for .NET that would let millions of C and C++ developers reuse their skills. It submitted the specification to ECMA at the same time, and ECMA-334 was published in December 2001. C# 1.0 shipped with Visual Studio .NET in January 2002 and looked a lot like Java.
Later versions pulled in ideas from functional programming, many by way of F#, which Microsoft Research built on .NET: generics in 2005, LINQ in 2007 and async/await in 2012. In 2014 Microsoft open-sourced its managed compilers, Roslyn among them, and announced that .NET Core, the base of a cross-platform .NET, would be open source too.
Why it’s built this way
- Stay close to C and C++
- The target audience was the huge base of C and C++ programmers. Familiar syntax let them move to .NET without learning a new notation.
- Standardize through ECMA from the start
- Microsoft wanted other vendors to be able to implement the language, and submitted the specification to ECMA the day it announced C#.
- Generics managed by the runtime
- Java’s generics, based on GJ, erase type arguments at compile time. .NET generics, designed at Microsoft Research and shipped with C# 2.0 in 2005, let the runtime JIT-compile code for each instantiation, so type information stays accurate at run time and integers need no boxing.
- Asynchrony as a language feature
- C# 5.0 focused almost entirely on
asyncandawait, letting the compiler turn sequential-looking code into callbacks instead of making developers write them by hand.
Timeline
- 2000
Microsoft announces C# on June 26 and submits it to ECMA
- 2002
C# 1.0 ships with Visual Studio .NET in January
- 2005
C# 2.0 adds generics and iterators
- 2007
C# 3.0 adds LINQ and lambda expressions
- 2012
C# 5.0 introduces
asyncandawait - 2014
Microsoft open-sources .NET Core, after its C#, VB and F# compilers
- 2025
C# 14 ships in November, the sixth yearly November release
- Microsoft: Microsoft introduces highly productive .NET programming language: C# (June 26, 2000)
- Artima: The C# design process, a conversation with Anders Hejlsberg (2003)
- Microsoft Learn: The history of C#
- Ecma International: ECMA-334 C# language specification (editions since December 2001)
- Don Syme: The early history of F# (HOPL IV, 2020), on .NET’s origins and F#’s influence on C#
- .NET Blog: .NET Core is open source (Nov 2014)
Sources7 · facts checked 8 October 2026
- Microsoft Learn: Managed execution process (CIL, metadata, JIT compilation)
- Microsoft Learn: A tour of the C# language
- Microsoft Learn: The history of C# (release dates, C# 5.0 async and await)
- Microsoft Learn: Asynchronous programming with async and await
- Microsoft Learn: Native AOT deployment (benefits and limitations)
- Ecma International: ECMA-334 C# language specification
- dotnet/roslyn license (MIT, .NET Foundation and contributors)