# C#

> Language for building .NET applications, from web services and desktop apps to Unity game scripts.

- **Appeared:** 2000
- **Creators:** Anders Hejlsberg
- **Maintained by:** Microsoft
- **Type:** backend
- **Status:** alive
- **Born from:** In January 1999 Anders Hejlsberg, who had designed Turbo Pascal and Delphi and worked on Visual J++, formed a team at Microsoft to build a new language for the .NET runtime, first called COOL. Microsoft's own Java had been tied up in a lawsuit with Sun since the late 1990s, and the January 2001 settlement ended the 1996 Java licence, so .NET needed a managed language of its own. The language was announced as C# in July 2000.
- **Reacts to:** java, delphi
- **Trade-offs:** garbage collected; static types; runs on a virtual machine; concurrency: threads, async. Cost: The .NET runtime is large and garbage-collected, so latency-sensitive code needs tuning that C or Rust code avoids.
- **Slots:** games ●●● strong (Unity uses C# for gameplay scripts.); server ●●● strong (Stack Overflow's 2016 web tier ran on ASP.NET MVC.); cli ●●○ ok; mobile ●○○ weak; browser ●○○ weak (Blazor runs C# in the browser through WebAssembly, but JavaScript is the default.); systems ○○○ none (Kernels and drivers are written in C or C++, not in C#.)
- **Alternatives:** java, kotlin, go, dart
- **Won where:** Unity, where gameplay scripts are written in C# [source](https://docs.unity.com/en-us/engine/6000.3/manual/scripting/get-started/intro-to); Stack Overflow, whose 2016 web tier ran on ASP.NET MVC 5.2.3 and .NET 4.6.1 [source](https://netlify.nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/)
- **Timeline:** 1999: Hejlsberg forms a team in January to build the language, then called COOL [source](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)); 2000: Microsoft's July 2000 Orlando release promotes C# as one of the .NET languages [source](https://news.microsoft.com/source/2000/07/11/microsoft-announces-groundswell-of-support-for-net-platform); 2001: Settlement with Sun ends the 1996 Java license that Microsoft had used [source](https://www.infoworld.com/article/2159673/sun-microsoft-settle-java-lawsuit.html); 2002: C# is standardized as ECMA-334, 2nd edition, in December 2002 [source](https://ecma-international.org/publications-and-standards/standards/ecma-334/); 2014: Microsoft announces that .NET Core will be open source, including the runtime [source](https://devblogs.microsoft.com/dotnet/net-core-is-open-source); 2023: ECMA-334 7th edition, the latest C# specification, is published in December [source](https://ecma-international.org/publications-and-standards/standards/ecma-334/)
- **Links:** [website](https://dotnet.microsoft.com), [repo](https://github.com/dotnet/runtime)
- **PLDB:** https://pldb.io/concepts/csharp.html
- **Sources:** https://en.wikipedia.org/wiki/C_Sharp_(programming_language), https://www.infoworld.com/article/2159673/sun-microsoft-settle-java-lawsuit.html, https://www.theregister.com/2010/07/05/dot_net_anniversary/, https://www.artima.com/intv/csdes.html, https://news.microsoft.com/source/2000/07/11/microsoft-announces-groundswell-of-support-for-net-platform, https://ecma-international.org/publications-and-standards/standards/ecma-334/, https://devblogs.microsoft.com/dotnet/net-core-is-open-source, https://docs.unity.com/en-us/engine/6000.3/manual/scripting/get-started/intro-to, https://netlify.nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/
- **Verified:** no, draft of 2026-10-30
- **Canonical:** https://langwhy.dev/lang/csharp/

## Why it exists

In January 1999 Anders Hejlsberg formed a team at Microsoft to build a new language, then called COOL, for the runtime that became .NET; by the time the .NET project was announced at the Professional Developers Conference in July 2000 it had been renamed C# ([Wikipedia](https://en.wikipedia.org/wiki/C_Sharp_(programming_language))). Microsoft's Java path was ending in court at the same time: in January 2001 it settled Sun's Java lawsuit, and the 1996 licence between the two companies was terminated ([InfoWorld](https://www.infoworld.com/article/2159673/sun-microsoft-settle-java-lawsuit.html)). Hejlsberg had designed Delphi at Borland and worked on Visual J++ at Microsoft ([Artima](https://www.artima.com/intv/csdes.html)), and in July 2000 he said C# is "not a Java clone" ([Wikipedia](https://en.wikipedia.org/wiki/C_Sharp_(programming_language))). Microsoft promoted .NET that month as a platform "designed for any programming language" ([Microsoft](https://news.microsoft.com/source/2000/07/11/microsoft-announces-groundswell-of-support-for-net-platform)).

## What it trades away

C# trades a large runtime for safety and tooling. Code is garbage-collected and runs on the .NET common runtime, so it gets a big standard library and strong tooling, but it also carries a runtime's startup time and memory overhead. Microsoft open-sourced .NET Core in 2014 ([Microsoft .NET blog](https://devblogs.microsoft.com/dotnet/net-core-is-open-source)), and its website now describes .NET as running on Windows, Linux and macOS ([.NET](https://dotnet.microsoft.com)). Latency-sensitive code still needs tuning that C or Rust code does not.

## Where it won

Unity, the game engine, uses C# for gameplay scripts, so game logic in Unity projects is written in C# ([Unity manual](https://docs.unity.com/en-us/engine/6000.3/manual/scripting/get-started/intro-to)). On the server, Stack Overflow's 2016 web tier ran on IIS, ASP.NET MVC 5.2.3 and .NET 4.6.1 ([Nick Craver](https://netlify.nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/)). The same post says the service tier ran IIS 8.5 on Windows Server 2012 R2, so production was Windows-first.

---
Data: CC0, https://github.com/langwhy/langwhy/blob/main/data/languages/csharp.yaml
