Master the fundamentals of C# programming - variables, control flow, data structures, and object-oriented basics
An introduction to C#, the .NET ecosystem, and what you can build with the language
C# is a modern, object-oriented programming language developed by Microsoft as part of the .NET platform
// The classic first program in C#
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
// With top-level statements (C# 9+, no class/Main boilerplate needed)
Console.WriteLine("Hello, World!");💡 Explanation: Every C# program starts execution in Main(). The using System; directive imports the System namespace, which contains Console. C# 9 introduced top-level statements so you can skip the class/Main boilerplate for simple programs.
Statically typed, compiled to IL, runs on .NET CLR
Enterprise apps, games (Unity), Windows desktop, ASP.NET web APIs
int x = 5; // type declared at compile time
Dynamically typed, interpreted, runs in browser/Node.js
Web frontends, full-stack web with Node.js
let x = 5; // type inferred at runtime
Dynamically typed, interpreted, concise syntax
Data science, scripting, machine learning
x = 5 # no type declaration needed
Statically typed, compiled to bytecode, runs on JVM
Android development, enterprise backend services
int x = 5; // nearly identical to C#