.

data types in C#

Type

Range

Size

bool (log)

true or false

bit? (not sure)

byte (unsign)

0 to 255

Unsigned 8-bit integer

sbyte (sign)

-128 to 127

Signed 8-bit integer

char

U+0000 to U+ffff

Unicode 16-bit character

short (sign)

-32,768 to 32,767

Signed 16-bit integer

ushort (unsign)

0 to 65,535

Unsigned 16-bit integer

int (sign)

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

Signed 32-bit integer

uint (unsign)

0 to 4,294,967,295

Unsigned 32-bit integer

long (sign)

-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807  (-2^63 … 2^63  -1)

Signed 64-bit integer

ulong (unsign)

0 to 18,446,744,073,709,551,615 (0 … 2^64  -1)

Unsigned 64-bit integer

decimal (fp)

+- 1E-28 … +- 7.9E28

128-bit

double (fp)

+- 5E-324 … +- 1.7E308

64-bit

float (fp) +- 1.5E-45 … +- 3.4E38  32-bit
object (ref)    
string (ref)    

What's your thoughts on this?

*

Protected by WP Anti Spam