C# Value Types and Ranges

Just because it’s good to know…..

Keyword

Class

Range

bool

System.Boolean

true and false

byte

System.Byte

0 to 255

sbyte

System.SByte

-128 to 127

short

System.Int16

-32768 to 32767

ushort

System.Uint16

0 to 65535

int

System.Int32

-2,147,483,648 to 2,147,483,647

uint

System.UInt32

0 to 4,294,967,295

long

System.Int64

-9,223,372,036,854,775,808 to
9,223,372,036,854,775,807

ulong

System.UInt64

0 to 18,446,744,073,709,551,615

decimal

System.Decimal

-79,228,162,514,264,337,593,543,950,335
to 79,228,162,514,264,337,593,543,950,335

double

System.Double

-1.79769313486232e308 to
1.79769313486232e308

float

System.Single

-3.402823e38 to 3.402823e38

char

System.Char

0 to 65535