# developer-madhan/learning-csharp architecture

> Architecture diagram of the GitHub repository developer-madhan/learning-csharp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/developer-madhan/learning-csharp
- Repository: https://github.com/developer-madhan/learning-csharp

## Overview

This is a beginner C# learning repository containing two console projects, not a single integrated product. The clearest active workflow is the encapsulation example: a user enters a PIN and menu choices, and the console program validates and applies ATM operations to an in-memory balance. Other files demonstrate or sketch language and OOP concepts; many examples are commented out. The graph reflects the supplied excerpts and README, so it does not assume unshown project wiring or treat commented examples as active flows.

Main entry points: [`ConsoleApp2/ConsoleApp2/Encapsulation.cs`](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Encapsulation.cs) (ATM console flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console1["ConsoleApp1 examples"]
  node_arrays_constants["Arrays and constants<br/>[Program.cs]"]
  node_math_helper["Math helper<br/>[MathHelper.cs]"]
  node_logger["Singleton logger<br/>[Logger.cs]"]
end

subgraph group_console2["ConsoleApp2 OOP examples"]
  node_atm_cli["ATM console flow<br/>[Encapsulation.cs]"]
  node_atm_model["Encapsulated ATM<br/>[Encapsulation.cs]"]
  node_atm_inheritance["ATM inheritance sketch<br/>[ATM_Machine.cs]"]
  node_atm_interfaces["ATM interface sketch<br/>[Intertry.cs]"]
  node_abstract_atm["Abstract ATM sketch<br/>[adstract.cs]"]
  node_payment_polymorphism["Payment polymorphism<br/>[polytry.cs]"]
end

subgraph group_concepts["Language concepts"]
  node_interface_demo["Interface demo<br/>[Class1.cs]"]
  node_class_examples["Class examples<br/>[Program.cs]"]
  node_program2_examples["Car example sketch<br/>[Program2.cs]"]
end

node_user(("Console user"))

node_user -->|"enters input"| node_atm_cli
node_atm_cli -->|"calls operations"| node_atm_model

click node_arrays_constants "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp1/ConsoleApp1/Program.cs"
click node_math_helper "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp1/ConsoleApp1/MathHelper.cs"
click node_logger "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp1/ConsoleApp1/Logger.cs"
click node_atm_cli "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Encapsulation.cs"
click node_atm_model "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Encapsulation.cs"
click node_atm_inheritance "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/ATM_Machine.cs"
click node_atm_interfaces "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Intertry.cs"
click node_abstract_atm "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/adstract.cs"
click node_payment_polymorphism "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/polytry.cs"
click node_interface_demo "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Class1.cs"
click node_class_examples "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Program.cs"
click node_program2_examples "https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Program2.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_arrays_constants,node_math_helper,node_logger,node_user toneBlue
class node_atm_cli,node_atm_model,node_atm_inheritance,node_atm_interfaces,node_abstract_atm,node_payment_polymorphism toneAmber
class node_interface_demo,node_class_examples,node_program2_examples toneMint
```

## Components

### ConsoleApp1 examples

- [Arrays and constants](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp1/ConsoleApp1/Program.cs): `ConsoleApp1/ConsoleApp1/Program.cs`
- [Math helper](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp1/ConsoleApp1/MathHelper.cs): `ConsoleApp1/ConsoleApp1/MathHelper.cs`
- [Singleton logger](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp1/ConsoleApp1/Logger.cs): `ConsoleApp1/ConsoleApp1/Logger.cs`

### ConsoleApp2 OOP examples

- [ATM console flow](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Encapsulation.cs): `ConsoleApp2/ConsoleApp2/Encapsulation.cs`
- [Encapsulated ATM](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Encapsulation.cs): `ConsoleApp2/ConsoleApp2/Encapsulation.cs`
- [ATM inheritance sketch](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/ATM_Machine.cs): `ConsoleApp2/ConsoleApp2/ATM_Machine.cs`
- [ATM interface sketch](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Intertry.cs): `ConsoleApp2/ConsoleApp2/Intertry.cs`
- [Abstract ATM sketch](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/adstract.cs): `ConsoleApp2/ConsoleApp2/adstract.cs`
- [Payment polymorphism](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/polytry.cs): `ConsoleApp2/ConsoleApp2/polytry.cs`

### Language concepts

- [Interface demo](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Class1.cs): `ConsoleApp2/ConsoleApp2/Class1.cs`
- [Class examples](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Program.cs): `ConsoleApp2/ConsoleApp2/Program.cs`
- [Car example sketch](https://github.com/developer-madhan/learning-csharp/blob/master/ConsoleApp2/ConsoleApp2/Program2.cs): `ConsoleApp2/ConsoleApp2/Program2.cs`

### Other components

- **Console user**

## Connections

- Console user → ATM console flow: enters input (evidence: `ConsoleApp2/ConsoleApp2/Encapsulation.cs`)
- ATM console flow → Encapsulated ATM: calls operations (evidence: `ConsoleApp2/ConsoleApp2/Encapsulation.cs`)
