B Simple Types

Fig. B.1 Simple types

Type Size in bits Value range Standard
bool 8 true or false  
byte 8 0 to 255, inclusive  
sbyte 8 –128 to 127, inclusive  
char 16 'u0000' to 'uFFFF' (0 to 65535), inclusive Unicode
short 16 –32768 to 32767, inclusive  
ushort 16 0 to 65535, inclusive  
int 32 –2,147,483,648 to 2,147,483,647, inclusive  
uint 32 0 to 4,294,967,295, inclusive  
float 32 Approximate negative range:
–3.4028234663852886E+38 to
–1.40129846432481707E–45
Approximate positive range:
1.40129846432481707E–45 to
3.4028234663852886E+38
Other supported values:
positive and negative zero
positive and negative infinity
not-a-number (NaN)
IEEE 754
IEC 60559
long 64 –9,223,372,036,854,775,808 to
9,223,372,036,854,775,807, inclusive
 
ulong 64 0 to 18,446,744,073,709,551,615, inclusive  
double 64 Approximate negative range:
–1.7976931348623157E+308 to
–4.94065645841246544E–324
Approximate positive range: 4.94065645841246544E–324 to 1.7976931348623157E+308
Other supported values:
positive and negative zero
positive and negative infinity
not-a-number (NaN)
IEEE 754
IEC 60559
decimal 128 Negative range:
–79,228,162,514,264,337,593,543,950,335
(–7.9E+28) to 1.0E–28
Positive range:
1.0E–28 to
79,228,162,514,264,337,593,543,950,335
(7.9E+28)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset