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.
What you will learn
- Build a reproducible console project.
- Trace types, null states, branches, and method calls.
- Model data and resource cleanup deliberately.
The C# Toolchain and Program Model
Distinguish the language, compiler, runtime, and libraries while building a reproducible console application.
Start learningTypes, Conversions, and Nullability
Choose numeric and reference representations deliberately and use nullable analysis as a contract checker rather than runtime magic.
Start learningControl Flow and Method Contracts
Use branches, loops, and methods to expose domain decisions and prove bounded progress without hidden side effects.
Start learningCollections, Strings, and Bounds
Separate sequence length, storage identity, keyed presence, and text units before choosing collection operations.
Start learningClasses, Interfaces, and Invariants
Model behavior through constructors, properties, and small interfaces without confusing inheritance with ownership or immutability.
Start learningExceptions and Deterministic Resource Cleanup
Distinguish expected invalid input from exceptional failure and keep resource release correct on every exit path.
Start learning