What is C#?
Why C# exists, what it powers — Unity games, Windows apps, web backends — and how it relates to C, C++, and Java.
C# (pronounced "C sharp", like the musical note) was created at Microsoft in 2000 by a team led by Anders Hejlsberg — one of the most influential language designers alive (he later co-created TypeScript, too).
The name is a music joke: in musical notation, a ♯ (sharp) raises a note a half-step. C# was pitched as a step up from C — and the # symbol even looks like four little + signs, one-upping C++.
What runs on C# today:
- Unity — the world's most popular game engine scripts everything in C#. Hollow Knight, Cuphead, Among Us, Pokémon GO — all C#
- Windows applications — most desktop software for Windows is built on .NET
- Web backends — ASP.NET powers millions of sites; Stack Overflow itself runs on C#
- Enterprise software — banks, hospitals, and governments run C# on their servers
- Cross-platform apps — .NET MAUI builds iOS and Android apps from one C# codebase
If your goal is making games or getting a job in the Microsoft/.NET world, C# is the language.
Let's untangle the name soup, because C, C++, and C# are three different languages:
| Language | Born | One-line summary |
|---|---|---|
| C | 1972 | Small, low-level, manual memory management |
| C++ | 1985 | C plus objects and much more — maximum control and speed |
| C# | 2000 | Modern, safe, garbage-collected — productivity first |
C# borrowed C-family syntax (braces, semicolons, if, for), so code looks related — but C# manages memory for you, checks your types strictly, and catches far more mistakes at compile time.
C#'s closest relative is actually Java: both compile to a portable format (IL / bytecode), both run on a managed runtime, both are strongly typed and object-oriented. If you ever read Java code, you'll find it eerily familiar — and this course will occasionally point out the few places where C# deliberately does things differently (usually more conveniently).
Which statement about C, C++, and C# is correct?
- AThey are three separate languages; C# shares the C-family syntax style but manages memory for you
- BC# is just the newest version of C++
- CThey are the same language at three difficulty levels
- DC# is a plugin that adds features to C
Like Java, C# is strongly typed — and that's great news for learning.
Every piece of data in C# has a declared type: whole number, decimal number, text, true/false… and the compiler verifies before the program runs that you use every value consistently. Try to store text where a number belongs, and the program simply won't compile.
What strictness buys you:
1. Mistakes surface immediately — at compile time with a line number, not as weird behavior at 2 AM.
2. Code documents itself — every variable announces what kind of data it holds.
3. Your tools get superpowers — because types are known, editors can autocomplete almost everything you type.
C# then layers on comforts Java learners envy: properties, string interpolation, var, expression-bodied methods — all coming up in this course. Strict where it matters, convenient everywhere else. That's C#'s personality in one sentence.
Here's a complete C# program. Don't memorize it — the next lesson dissects every line.
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, World!");
}
}A preview of the pieces:
using System;— lets us use built-in tools likeConsoleby their short names.class Program { ... }— C# code lives inside a class (a named container).static void Main()— the entry point; execution starts here.Console.WriteLine("Hello, World!");— prints text to the screen.
Run it, and the screen shows Hello, World! — the traditional first program in every language.
What does this program print?
using System;
class Program
{
static void Main()
{
Console.WriteLine("C#");
Console.WriteLine("is fun");
}
}- AC# is fun
- BC# is fun
- CC#is fun
- DError
The world's most popular game engine, ___, uses C# for all of its game scripts.