Lesson 1 of 40
Foundations
Beginner
โฑ 20 min
C# & .NET 10 โ Getting Started
Install the .NET 10 SDK, create your first C# project in Visual Studio 2026, understand the project structure, and write your first working program.
Part 1: Installing .NET 10 & Visual Studio 2026
Download Visual Studio 2026 from visualstudio.microsoft.com. During installation select the .NET desktop development and ASP.NET and web development workloads. The .NET 10 SDK is bundled automatically.
After installation verify at a terminal:
After installation verify at a terminal:
dotnet --version // Should print 10.x.x
Part 2: Creating Your First Project
In VS 2026: File โ New โ Project. Choose Console App, name it
VS 2026 generates a minimal
HelloCSharp, select .NET 10, and click Create.VS 2026 generates a minimal
Program.cs: // Program.cs โ top-level statements (no Main method needed)
Console.WriteLine("Hello, C#!");
Press Ctrl+F5 to run. You'll see Console.WriteLine("Hello, C#!");
Hello, C#! in the terminal.Part 3: Project Structure Explained
| File / Folder | Purpose |
|---|---|
Program.cs | Your application entry point |
HelloCSharp.csproj | Project configuration & NuGet dependencies |
bin/ | Compiled output |
obj/ | Build intermediates (ignore in git) |
Part 4: Understanding the .csproj File
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
ImplicitUsings auto-imports common namespaces so you don't need using System; etc. at the top of every file.
C# in Visual Studio 2026
๐ This lesson is part of the book C# in Visual Studio 2026 by Dr. Liew Voon Kiong.
View on Amazon Kindle Edition