← C# Programming learning pathC# Programming · Module 2 of 10
Variables, types and operators
Store data with value and reference types.
📖 Key ideas
- Types: int, double, decimal, bool, char, string.
- var infers the type: var count = 5;
- decimal suits money calculations.
- const for compile-time constants; readonly for runtime-set fields.
- String interpolation: $"Hello {name}".
💡 Real-life example: Types are labelled jars: rice in the rice jar, sugar in the sugar jar, no mixing.
intWhole number type
decimalHigh-precision number for money
varImplicitly typed local
$"..."Interpolated string