Labs ICT
Pro Login

Get Started

Before you can write C#, you need the right tools. The good news? Setting up is free and takes about 10 minutes. Let me walk you through what you need.

Option 1: Visual Studio (Full-Featured)

Visual Studio is Microsoft's flagship IDE (Integrated Development Environment). It's powerful, packed with features, and makes C# development a breeze. The Community edition is completely free.

Head over to visualstudio.microsoft.com, download Visual Studio Community, and during installation, select the ".NET desktop development" workload. That's it — you're ready to write C#.

Visual Studio gives you IntelliSense (auto-completion), debugging, code navigation, and a built-in project template system. It's what most professional C# developers use.

Option 2: VS Code + .NET SDK (Lightweight)

If you prefer a lighter editor, VS Code with the C# extension works great. You'll also need the .NET SDK, which includes the compiler and runtime.

Download the .NET SDK from dotnet.microsoft.com. Once installed, open a terminal and type:


dotnet --version
    

If you see a version number, you're good to go. Now install VS Code and the C# Dev Kit extension from the marketplace.

Your First C# Program

Let's create a C# project using the .NET CLI. Open a terminal and run:


dotnet new console -n MyFirstApp
cd MyFirstApp
code .
    

This creates a new console application. Open the Program.cs file — you'll see something like this:


using System;

class Program {
  static void Main() {
    Console.WriteLine("Hello World!");
  }
}
    

To run your program, use:


dotnet run
    

You should see "Hello World!" printed in the terminal. Congratulations — you just ran your first C# program!

Try it Yourself →

What Just Happened?

When you ran dotnet run, the .NET CLI compiled your code and executed it. The compiler first checked your code for errors (yours had none), then created an executable, and finally ran it. The whole process took maybe a second.

As you progress through this tutorial, you'll use this same workflow hundreds of times. It becomes second nature — write, run, see output, repeat.