C# Get Started
C# Get Started
This guide will help you set up C#, write your first program, and understand the basic workflow.
1: Install .NET SDK
C# programs run on the .NET platform.
✔ Check if .NET is already installed
Open Command Prompt and run:
If a version number appears, .NET is installed.
✔ Download & Install
-
Download .NET SDK (LTS version)
-
Choose your OS: Windows / Linux / macOS
-
Install and restart your system
2: Install an IDE (Recommended)
✅ Visual Studio (Best for Beginners)
-
Download Visual Studio Community
-
During installation, select:
-
✔ .NET Desktop Development
-
✔ ASP.NET and web development (optional)
-
✅ Other Options
-
Visual Studio Code (lightweight)
-
JetBrains Rider
3: Create Your First C# Program
✔ Using Command Line
✔ Default Program Code
Output:
4: Understand Program Structure
| Part | Description |
|---|---|
using System; |
Imports built-in libraries |
class Program |
Defines a class |
Main() |
Entry point of the program |
Console.WriteLine() |
Prints output |
5: Run the Program
6: C# File Extension
-
C# source file:
.cs -
Project file:
.csproj
Common C# Project Types
-
Console App
-
ASP.NET Web App
-
Class Library
-
Windows Forms / WPF
-
Web API
Next Steps in C#
After getting started, learn:
-
C# Syntax & Comments
-
Variables & Data Types
-
Operators
-
Control Statements (
if,switch, loops) -
Methods & Classes
-
OOP Concepts
-
Exception Handling
