Part 1 Beginners · the C# you need before ASP.NET Core
Fourteen short lessons. Each one explains an idea in a few sentences, shows a small program, and prints what that program outputs. Every example is a real file you can run and change.
- Runnable with dotnet run
- Modern C# 14
- Built toward Web APIs
dotnet run app/01-intro/Hello.cs- 1.NET & First Program
What C# and .NET are, and how code becomes a running program.
- 2Variables & Types
Declaring variables and constants, and the built-in primitive types.
- 3Type Conversion
Implicit, explicit, Convert, Parse, and the safe TryParse.
- 4Operators
Arithmetic, comparison, logical, and the null operators.
- 5Classes
Blueprints for objects: fields, methods, and static members.
- 6Structs & Enums
Lightweight value types and named constants.
- 7Value vs Reference
Why copying an int and copying an object behave differently.
- 8Conditionals
if/else, switch statements, switch expressions, and ?:.
- 9Loops
for, foreach, while, do-while, break, and continue.
- 10Arrays & Lists
Fixed-size arrays and the growable List<T>.
- 11Dates & Times
DateTime, TimeSpan, DateOnly, and why APIs use UTC.
- 12Strings & Text
Formatting, searching, splitting, and StringBuilder.
- 13Files & Directories
File, Directory, and Path for reading and writing to disk.
- 14Debugging
Breakpoints, stepping, and defensive code that fails early.