Lesson 1 of 2 | Foundations of C# & .NET
Introduction to C# and the .NET Ecosystem
Part A: What is C#? - 10 mins
C# (pronounced C-Sharp) is a modern, object-oriented programming language developed by Microsoft in 2000.
Why learn C# in 2026:
- Versatile: One language for Web (ASP.NET), Mobile (MAUI), Desktop, Games (Unity), Cloud and AI.
- Beginner Friendly: Clean syntax, similar to Java and C++ but easier.
- High Demand: Used by enterprises, startups, and game studios. Strong job market.
- Powerful Tooling: Best-in-class IDEs and free .NET platform.
Part B: The .NET Ecosystem Explained - 15 mins
This is where most beginners get confused. Explain it simply:
Think of it like this: C# is the language you write, .NET is the platform that runs it.
.NET has 3 main parts:
- CLR (Common Language Runtime): The engine. It compiles your code, manages memory, and runs your app. Your C# code doesn't run directly on Windows, it runs on CLR.
- BCL (Base Class Library): A huge collection of ready-made code. Need to work with files, strings, dates, database? It's already in BCL. You don't have to build from scratch.
- Languages: .NET supports C#, F#, VB.NET. You are learning C# which is the most popular.
Important Clarification for Students:
- .NET Framework = Old, Windows-only (2002-2019)
- .NET Core / .NET 5 / 6 / 7 / 8 / 9 = New, Cross-platform, fast, open-source. This is what we use today. .NET 8 is the current LTS version.
Flow of Execution: You write C# code -> Compiler converts it to IL (Intermediate Language) -> CLR converts IL to machine code and runs it.
Part C: Setup and First Program - 15 mins
Tools Needed:
- .NET SDK 8 or 9: The engine to build and run.
- IDE: Visual Studio 2022 (Best for Windows) OR VS Code + C# Dev Kit (Lightweight, works on all OS).
Your First Program:
Show these commands in terminal:
Bash
dotnet --versiondotnet new console -n MyFirstAppcd MyFirstAppdotnet run
Then show the code and explain EVERY line:
C#
using System; // Importing tools from .NET Base Class Library
class Program // A container for your code{ static void Main() // The starting point of every C# app { Console.WriteLine("Hello, World!"); // Print text to screen }}
4 lines hidden
Common Doubts to Address:
- Why
using System? BecauseConsolelives inside it. - Why
static void Main? Because .NET needs one fixed entry point. - What is
;and{ }? Semicolon ends a statement, braces group code.
3. Live Demo Task For Video
Do this on screen: Create a program that prints your name, your city, and what you want to build with C#.
4. Recap - 2 mins
- C# is the language, .NET is the platform that runs it.
- CLR runs the code, BCL gives you pre-built features.
- We use modern .NET (8/9), not old .NET Framework.
- Every C# app starts from
Main()method.