🔷 .NET Fundamentals

Master the basics of .NET development, from C# syntax to building your first application.

Introduction to .NET

.NET is a free, cross-platform, open-source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, IoT, and more.

Why .NET?

Your First C# Program

Create a simple console application:

// Program.cs Console.WriteLine("Hello, .NET World!"); // Using top-level statements (C# 9+) // No Main method required!

Creating a New Project

# Create a new console application dotnet new console -n MyFirstApp # Navigate to the project cd MyFirstApp # Run the application dotnet run

C# Language Features

Modern C# includes powerful features:

// Records for immutable data public record Person(string Name, int Age); // Pattern matching var message = person switch { { Age: < 18 } => "Minor", { Age: >= 18 and < 65 } => "Adult", _ => "Senior" }; // Null-conditional and null-coalescing string? name = person?.Name ?? "Unknown"; // LINQ for data manipulation var adults = people.Where(p => p.Age >= 18) .OrderBy(p => p.Name) .ToList();

Next Steps

← Back to Developer Resources