Learn C# in Y Minutes
C# 14 · .NET 10

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
Run any example
dotnet run app/01-intro/Hello.cs
  1. 1.NET & First Program

    What C# and .NET are, and how code becomes a running program.

  2. 2Variables & Types

    Declaring variables and constants, and the built-in primitive types.

  3. 3Type Conversion

    Implicit, explicit, Convert, Parse, and the safe TryParse.

  4. 4Operators

    Arithmetic, comparison, logical, and the null operators.

  5. 5Classes

    Blueprints for objects: fields, methods, and static members.

  6. 6Structs & Enums

    Lightweight value types and named constants.

  7. 7Value vs Reference

    Why copying an int and copying an object behave differently.

  8. 8Conditionals

    if/else, switch statements, switch expressions, and ?:.

  9. 9Loops

    for, foreach, while, do-while, break, and continue.

  10. 10Arrays & Lists

    Fixed-size arrays and the growable List<T>.

  11. 11Dates & Times

    DateTime, TimeSpan, DateOnly, and why APIs use UTC.

  12. 12Strings & Text

    Formatting, searching, splitting, and StringBuilder.

  13. 13Files & Directories

    File, Directory, and Path for reading and writing to disk.

  14. 14Debugging

    Breakpoints, stepping, and defensive code that fails early.