C# is a typed language on the .NET platform. It supports command-line tools, background services, and the application logic used by ASP.NET web applications.
What you need first
Know basic variables, loops, and functions. Install the .NET SDK, which supplies the build and run tools. Read the starter program before exploring project configuration.
A type describes a value: int score = 10. A nullable value can represent absence, which differs from a valid zero.
A class groups behavior and data. A record is useful when comparing values by their contents.
A Task represents eventual completion. Await asynchronous operations rather than blocking while they wait.
Connect it to a real project
Build a habit-report tool, then add typed records, file input, asynchronous work, tests, and a hosted background processor.
Study one concept at a time. Explain its everyday example in your own words, predict the worked example’s result, then try a small change. Use practice and quiz feedback to decide what to revisit. You can spread a lesson across several study sessions.
Set up your environment Tools, setup steps, and completion requirements
Start with the ideas above, then set up the tools below. Return to the starter example whenever a new term feels unfamiliar.
text
dotnet --version
dotnet new console -n Lesson
cd Lesson
dotnet run
# Tests: dotnet new xunit -n Lesson.Tests, add a project reference, then run dotnet test
# Use a current LTS .NET SDK. Keep <Nullable>enable</Nullable> and add <TreatWarningsAsErrors>true</TreatWarningsAsErrors>.
A free account saves your progress, notes, exercise evidence and spaced review cards. To complete a lesson, score at least 80% on its quiz, finish both exercises and the project checklist, and submit your project link with a reflection. Project evidence is self-reported; use the final portfolio rubrics to seek an independent code review.
Your C# learning path
Work through these foundations in order, then bring them together in a project.
In a project created with dotnet new console, put this in Program.cs and run dotnet run. The loop prints a learning goal for each topic with string interpolation.
var topics = new[] { "records", "LINQ", "async" };
foreach (var topic in topics)
{
Console.WriteLine($"Learn {topic}");
}
Try it yourself
Use LINQ to keep only the topics longer than four characters and print how many remain.
Put it into practice
Build an expense tracker
Create a console app that records and summarizes expenses.
Model an expense as a record with a date, category and decimal amount.
Load and save expenses as JSON and validate every field.
Summarize totals by category and month with LINQ.
Write xUnit tests for parsing, validation and the summaries.
Keep exploring
Find your next course
Choose a language, build on it with a framework, or explore AI and search.