๐Ÿ  VisualStudioTutor.com  ยท  C# Tutorial Home  ยท  C# Lesson 1 of 40
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:
dotnet --version // Should print 10.x.x

Part 2: Creating Your First Project

In VS 2026: File โ†’ New โ†’ Project. Choose Console App, name it 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 Hello, C#! in the terminal.

Part 3: Project Structure Explained

File / FolderPurpose
Program.csYour application entry point
HelloCSharp.csprojProject 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>
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