Course · 26 lessons

Practical .NET

Errors, data, files, and async code for real programs.

  1. Exceptions

    An exception stops the current line. catch decides what happens next.

    Errors · 8 min
  2. Validation

    TryParse checks input without throwing.

    Errors · 8 min
  3. Dates and culture

    Parse dates with an exact format and the invariant culture.

    Data · 8 min
  4. Money

    Round money once, at the end, with an explicit rule.

    Data · 8 min
  5. JSON

    System.Text.Json turns records into text and back.

    Data · 8 min
  6. Text formats

    Alignment and format strings line up a table.

    Output · 8 min
  7. Project files

    A run can write files. You decide whether to keep them.

    Files · 8 min
  8. async and await

    await waits for a task without blocking the program.

    Async · 8 min
  9. Timers and cancellation

    A CancellationToken asks running work to stop.

    Async · 8 min
  10. Separate calculation from output

    Compute in one place, print in another.

    Design · 8 min
  11. Parsing with an explicit numeric grammar

    Choose the permitted numeric syntax instead of inheriting ambient culture rules.

    Practical workflows · 15 min
  12. Comparing instants with different offsets

    Separate a point on the timeline from its displayed local clock time.

    Practical workflows · 15 min
  13. Date-only and time-only domain values

    Represent calendar dates and clock times without inventing an unnecessary timestamp.

    Practical workflows · 15 min
  14. Rounding at a documented money boundary

    Choose whether rounding happens per line or after aggregation.

    Practical workflows · 15 min
  15. A JSON contract with explicit property names

    Keep the wire format separate from an internal object model.

    Practical workflows · 15 min
  16. Strict and permissive JSON document options

    Accept format extensions only when the import contract permits them.

    Practical workflows · 15 min
  17. Small regular expressions with a precise contract

    Validate a narrow identifier format without treating every text problem as a regex.

    Practical workflows · 15 min
  18. Building a deterministic text report

    Separate calculation, ordering, and repeated text assembly.

    Practical workflows · 15 min
  19. UTF-8 bytes and text boundaries

    Measure encoded data separately from the number of UTF-16 code units.

    Practical workflows · 15 min
  20. Hexadecimal as a byte representation

    Round-trip binary values without confusing bytes with formatted text.

    Practical workflows · 15 min
  21. Escaping a URI query value

    Encode data as one component instead of concatenating it as URI syntax.

    Practical workflows · 15 min
  22. Boundary examples as executable checks

    Test the points where a small rule changes its answer.

    Practical workflows · 15 min
  23. A result value for expected rejection

    Return success or a reason without throwing for ordinary invalid input.

    Practical workflows · 15 min
  24. Ownership at a using boundary

    Dispose the resource you own when its work scope ends.

    Practical workflows · 15 min
  25. Isolating failures within a batch

    Decide which errors reject one record and which errors should stop all work.

    Practical workflows · 15 min
  26. A small import pipeline with explicit stages

    Parse a limited row format, validate values, aggregate duplicates, and report results.

    Practical workflows · 15 min