📌Numeric (integral)
Type | Size | Range |
---|
byte | 8-bit | 0 to 255 |
sbyte | 8-bit | -128 to 127 |
short | 16-bit | -32,768 to 32,767 |
ushort | 16-bit | 0 to 65,535 |
int | 32-bit | -2,147,483,648 to 2,147,483,647 |
uint | 32-bit | 0 to 4,294,967,295 |
long | 64-bit | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
ulong | 64-bit | 0 to 18,446,744,073,709,551,615 |
char | 16-bit | A Unicode character |
📌Numeric (Floating-point & Decimal)
Type | Size | Precision |
---|
float | 32-bit | ~7 digits |
double | 64-bit | ~15-16 digits |
decimal | 128-bit | ~28-29 digits (for financial use) |
Other Value Types
bool
→ true
or false
- Structs → user-defined value type
- Enums → named set of constants