Skip to content

Sahithbasani/csharp-fundamentals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C# engineering reference

Build Markdown Links C# .NET Modules License

C# Engineering Fundamentals

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.

Table of Contents

Engineering Model

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"]
Loading

Engineering Quality

Repository quality is enforced through small, reviewable changes and automated verification:

  • Continuous integration: every push to main or a feature branch and every pull request to main restores 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 Index

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

Documentation Standard

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 .cs examples using orders, payments, users, claims, services, and infrastructure boundaries.

Runnable Scenarios

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 -- payment

See the execution guide.

Build and Validate

Requires the .NET 10 SDK.

dotnet restore src/CSharpFundamentals/CSharpFundamentals.slnx
dotnet build src/CSharpFundamentals/CSharpFundamentals.slnx --configuration Release

Repository Structure

csharp-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/

Contribution Standard

  • 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.

License

Distributed under the MIT License.


C# semantics connected to production engineering decisions.

About

A comprehensive guide to C# fundamentals with clean code examples, best practices, interview-focused explanations, and real-world scenarios for modern .NET development.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages