C#
C# is a programming language announced by Microsoft in 2000 and officially released in 2002, designed by Anders Hejlsberg. The design drew on the low-level control of C++, the memory safety of Java, and the developer productivity of Delphi. Today it runs on the .NET platform, supports Windows, Linux, and macOS, and is widely used in game development (Unity), web backends, and enterprise systems.
The Origin of the Name
The "sharp" in C# comes from the musical sharp symbol (♯), which raises a note by a semitone. Where C++ uses ++ to mean "one step above C," C# goes one more semitone higher. The actual symbol is ♯, but the keyboard-friendly # (number sign / hash) is used in practice.
Another reading: if you see # as four + signs arranged in a grid, it can be read as "C++++" — another layer of increment humor.
2000: The Birth of C#
The birth of C# is entangled with a conflict between Microsoft and Sun Microsystems (creators of Java) in the late 1990s. Microsoft had been offering "Visual J++," an independently extended version of Java for Windows, but Sun sued them for violating the Java license. The dispute settled in 1997, leaving Microsoft unable to extend Java freely. The response was to create a new language entirely.
The task was given to Hejlsberg. Before joining Microsoft in 1996, he had designed two language systems at Borland: Turbo Pascal (1983) and Delphi (1995). Turbo Pascal was known for compilation speed that was remarkable for its era; Delphi pioneered the visual development model (dragging and dropping GUI components to build applications). These experiences carried directly into C#.
C# 1.0 was released together with .NET Framework 1.0 in 2002. The first version provided the full object-oriented foundation — classes, interfaces, delegates, and events — running exclusively on Windows.
Hejlsberg's Design Philosophy
Hejlsberg's central idea for C# was the "Pit of Success": design the language so that writing correct code is easier than writing incorrect code.
| Principle | Meaning |
|---|---|
| Pit of Success | Design the language so that the correct approach is also the easiest approach. Automatic memory management, array bounds checking, and nullable reference types are all implementations of this idea. |
| Pragmatic flexibility | Not dogmatically committed to pure OOP. LINQ (functional), pattern matching, and record types (immutable data) were added as real-world needs arose. |
| Backward compatibility | New features are almost always opt-in, so existing code continues to work on newer runtimes without modification. |
| Open-source pivot | The .NET Foundation was established in 2014, opening the runtime, compiler (Roslyn), and standard library on GitHub with community contributions accepted. |
The C# Family Tree
C# draws from Java and C/C++, and through its designer Hejlsberg, shares a lineage with Turbo Pascal and Delphi. It has in turn influenced TypeScript, Kotlin, and other modern languages.
| Language | Relationship to C# |
|---|---|
| Java | The strongest influence on C#. The intermediate-code compilation model, GC-based memory management, and OOP design were drawn from Java. |
| C / C++ | C-family syntax (curly braces, semicolons) was inherited. The main difference is that C# automates memory management with GC instead of manual allocation. |
| Delphi | Hejlsberg's previous language. Properties, events, and the visual-development model carried over into C#. |
| TypeScript | Also designed by Hejlsberg. Classes, interfaces, generics, and async/await in TypeScript reflect the design experience built in C#. |
| JavaScript / Python / Kotlin | C#'s async/await syntax (C# 5.0, 2012) was adopted in similar form by JavaScript (ES2017), Python (3.5), Rust, and Kotlin. |
Key Historical Milestones
2002: C# 1.0 / .NET Framework 1.0
C# and the .NET Framework 1.0 are released together. The first version includes the full OOP foundation — classes, interfaces, delegates, and events — and runs exclusively on Windows.
2005: C# 2.0 — Generics
Generics (List<T>, etc.), anonymous methods, and nullable value types are added. Type-safe collection operations become possible, significantly increasing the language's expressive power.
2007: C# 3.0 — LINQ and Lambda Expressions
LINQ (Language Integrated Query), lambda expressions, anonymous types, var (type inference), and extension methods are introduced. LINQ lets different data sources — arrays, lists, databases, XML — be filtered, sorted, and aggregated with a single unified syntax. It became one of the features that set C# apart from other languages of the era.
2012: C# 5.0 — async/await
The async/await syntax for writing asynchronous code in a synchronous style is introduced. This construct was later adopted in similar form by JavaScript (ES2017), Python (3.5), Rust, and Kotlin, making it one of C#'s most influential contributions to language design.
2016: .NET Core — cross-platform
Microsoft releases .NET Core as an open-source, cross-platform runtime. C# applications can now run on Linux and macOS, and the perception of C# as "Windows-only" begins to shift.
2019: C# 8.0 — nullable reference types
Nullable reference types are introduced. Variables that may be assigned null must be marked explicitly (e.g., string?), allowing NullReferenceExceptions to be caught at compile time rather than at runtime.
2020: C# 9.0 / .NET 5 — platform unification
.NET Framework and .NET Core are unified into ".NET 5," the current standard platform. C# 9.0 adds record types, top-level statements (a complete Hello World in a single line: Console.WriteLine("Hello");), and init-only setters.
2022 / 2023: C# 11 and 12 — continued refinement
C# 11 adds raw string literals and list patterns. C# 12 adds primary constructors and collection expressions. The annual release cadence continues to improve practical usability.
C# Compared to Contemporaries
| Language | Year | Memory | Execution | Primary Domain |
|---|---|---|---|---|
| Java | 1995 | GC (automatic) | Bytecode → JIT | Enterprise, Android, web |
| C# | 2002 | GC (automatic) | IL → JIT / AOT | Enterprise, games (Unity), web |
| Python | 1991 | GC (ref counting) | Interpreter | Data science, AI, scripting |
| C++ | 1985 | Manual + RAII | Native machine code | Game engines, embedded, HPC |
| Kotlin | 2011 | GC (automatic) | JVM bytecode | Android, server-side |
C# Today
Game development with Unity
Unity adopted C# as its sole scripting language. All game logic, UI, and physics configuration in Unity projects is written in C#. This choice has significantly broadened C#'s reach, bringing many developers to the language through game development.
Web backends with ASP.NET Core
ASP.NET Core is the primary web framework for .NET. Since .NET 5, it runs reliably on Linux in containerized environments. Hosting ASP.NET Core on Docker and Kubernetes has become common.
Windows desktop applications
WPF (Windows Presentation Foundation) and WinForms applications are developed in C#. These frameworks have a long track record and remain in wide use for internal business tools and enterprise software.
Cloud and serverless
Azure Functions in C# is a natural fit given Microsoft's involvement with both. AWS Lambda and Google Cloud Functions also support C#, making it a viable choice for cloud-native and serverless workloads beyond the Microsoft ecosystem.
Common Misconceptions
"C# is Windows-only"
Since .NET Core (2016), C# runs on Linux and macOS. The platform unification in .NET 5 (2020) made cross-platform support the default. Hosting C# backends on Linux servers in containers is now standard practice.
"C# is just a Java clone"
C# was heavily influenced by Java at the outset, and Hejlsberg has acknowledged this. However, C# has since introduced major features ahead of Java: async/await, LINQ, nullable reference types, pattern matching, and record types all appeared in C# first, with Java and other languages adding comparable features later.
"C# is a closed Microsoft technology"
C#'s language specification is standardized as ECMA-334 and ISO/IEC 23270. The .NET runtime, the Roslyn compiler, and the standard library are all open-source on GitHub. Community pull requests are accepted. The open-source pivot began in 2014, and the project now operates with essentially open governance.
Related Terms
- async / await — asynchronous programming syntax
- LINQ — Language Integrated Query
- Generics — type-parameterized code
- Nullable types — explicit marking of null-assignable variables
- record types — immutable data classes
- History of Java — the language C# was most influenced by
- History of C++ — the source of C#'s syntax lineage
If you find any errors or copyright issues, please contact us.