This page puts the site’s examples in a sensible order for someone learning C#. It assumes you have installed the .NET SDK and can create a console project with dotnet new console. Each step builds on the previous one, but feel free to skip what you already know.
1. The basics
Start by getting output on the screen and data into your program.
- Write to the console
- Read command-line arguments
- Try, catch and finally
- Optional parameters and named arguments
2. Strings, numbers and dates
Most bugs in beginner code come from formatting and parsing. These posts explain the culture settings that cause them.
- Format a double
- Format a DateTime
- Compare dates
- Convert numbers to and from hexadecimal
- Regular expressions
3. Collections and LINQ
Once you can work with single values, learn to work with many of them.
- Which collection to use and when
- List versus ArrayList
- Dictionary versus Hashtable
- Stack and Queue
- LINQ examples
- yield return and iterators
4. Types and language features
- Enums with the Flags attribute
- Delegates and events
- Commonly used attributes
- Reflection
- The dynamic type
5. Files and data
- List files in a directory
- Zip and unzip files
- XML serialization
- Query a MySQL database
- Read an Excel file
6. Asynchronous and concurrent code
Leave this until the earlier steps feel comfortable. It is where most hard-to-reproduce bugs live.
7. Algorithms and data structures
Writing these yourself is the best way to understand what the built-in types do for you.
When you are ready to test yourself, work through the interview questions and answers.