C# / Basic: Typed Programs and Object Contracts

C# β€” Basic: Typed Programs and Object Contracts

Read and construct C# console programs with clear values, control, collections, and failure behavior.

6 lessons Β· No account required

What you will learn

  • Build a reproducible console project.
  • Trace types, null states, branches, and method calls.
  • Model data and resource cleanup deliberately.
  1. The C# Toolchain and Program Model

    Distinguish the language, compiler, runtime, and libraries while building a reproducible console application.

    Start learning
  2. Types, Conversions, and Nullability

    Choose numeric and reference representations deliberately and use nullable analysis as a contract checker rather than runtime magic.

    Start learning
  3. Control Flow and Method Contracts

    Use branches, loops, and methods to expose domain decisions and prove bounded progress without hidden side effects.

    Start learning
  4. Collections, Strings, and Bounds

    Separate sequence length, storage identity, keyed presence, and text units before choosing collection operations.

    Start learning
  5. Classes, Interfaces, and Invariants

    Model behavior through constructors, properties, and small interfaces without confusing inheritance with ownership or immutability.

    Start learning
  6. Exceptions and Deterministic Resource Cleanup

    Distinguish expected invalid input from exceptional failure and keep resource release correct on every exit path.

    Start learning
Back to course