2 Basic Types

2.1 Syntax

basic-type basic-value-type | basic-reference-type
basic-value-type bool | char | sbyte | byte | short | ushort | int | uint | long | ulong | float | double | void
basic-reference-type object | string
Type Alternative name Range of values inclusive
bool System.Boolean true | false
char System.Char ['\U00000000', '\U0010FFFD']
sbyte System.Int8 [-128, 127]
byte System.UInt8 [0u, 255u]
short System.Int16 [-32768, 32768]
ushort System.UInt16 [0u, 65535u]
int System.Int32 [-2147483648, 2147483647]
uint System.UInt32 [0u, 4294967295u]
long System.Int64 [-9223372036854775808, -9223372036854775807]
ulong System.UInt64 [0u, 18446744073709551615u]
float System.Float [2−126 ≈ 1.18 × 10−38, (2 − 2−23) × 2127 ≈ 3.402823 × 1038]
double System.Double [±2.23×10308, ±1.80×10308]
void System.Void