A production-focused reference for C# language semantics, runtime behavior, API design, performance, and enterprise application development.
This repository is not organized as a syntax tutorial. Each module is an engineering dossier containing theory, memory and performance analysis, production notes, failure patterns, review guidance, senior interview questions, and compileable backend examples.
- Engineering Model
- Engineering Quality
- Module Index
- Documentation Standard
- Runnable Scenarios
- Build and Validate
- Repository Structure
- Contribution Standard
flowchart LR
Semantics["Language semantics"] --> Contracts["API contracts"]
Contracts --> Runtime["Memory and runtime"]
Runtime --> Performance["Measured performance"]
Performance --> Operations["Production behavior"]
Operations --> Review["Review and interview reasoning"]
Repository quality is enforced through small, reviewable changes and automated verification:
- Continuous integration: every push to
mainor a feature branch and every pull request tomainrestores and builds the solution in Release mode. - Strict compilation: CI treats compiler warnings as errors to prevent warning debt from entering the stable branch.
- Documentation integrity: Markdown links are checked automatically when documentation changes.
- Reproducible tooling: workflows install the .NET 10 SDK explicitly instead of relying on the runner's preinstalled SDKs.
- Testing policy: no automated test project exists yet; when one is introduced, its test job should become a required pull-request check.
| Module | Engineering area | Code examples |
|---|---|---|
| 01 | Variables and State | 4 |
| 02 | Data Types and Representation | 5 |
| 03 | Type Conversion and Boundary Parsing | 5 |
| 04 | Operators and Expression Semantics | 8 |
| 05 | Strings, Text, Culture, and Encoding | 8 |
| 06 | Arrays, Spans, and Contiguous Memory | 8 |
| 07 | Methods, Contracts, and API Shape | 4 |
| 08 | Control Flow and Business Decisions | 4 |
| 09 | Exceptions, Resilience, and Failure Semantics | 4 |
| 10 | Namespaces, Assemblies, and Dependency Boundaries | 4 |
Every module contains:
README.md— decision-oriented overview and navigation;Theory.md— language and runtime semantics;BestPractices.md— implementation and review checklist;CommonMistakes.md— production failure patterns;InterviewQuestions.md— 10 senior-level questions with answers;ProductionNotes.md— enterprise use, memory, performance, and Microsoft-aligned recommendations;- compileable
.csexamples using orders, payments, users, claims, services, and infrastructure boundaries.
The application includes executable order processing, payment validation, and notification dispatch examples.
dotnet run --project src/CSharpFundamentals/CSharpFundamentals/CSharpFundamentals.csproj
dotnet run --project src/CSharpFundamentals/CSharpFundamentals/CSharpFundamentals.csproj -- paymentSee the execution guide.
Requires the .NET 10 SDK.
dotnet restore src/CSharpFundamentals/CSharpFundamentals.slnx
dotnet build src/CSharpFundamentals/CSharpFundamentals.slnx --configuration Releasecsharp-fundamentals/
├── assets/
├── examples/
└── src/CSharpFundamentals/CSharpFundamentals/
├── Examples/ # Executable cross-topic scenarios
└── Modules/
├── 01-Variables/
├── 02-DataTypes/
├── 03-TypeConversion/
├── 04-Operators/
├── 05-Strings/
├── 06-Arrays/
├── 07-Methods/
├── 08-ControlFlow/
├── 09-ExceptionHandling/
└── 10-Namespaces/
- Explain the production decision, not only the syntax.
- Keep examples compileable and domain-oriented.
- Include memory, performance, failure, and testing implications.
- Prefer primary Microsoft references.
- Avoid toy models, empty placeholders, and unexplained snippets.
Distributed under the MIT License.