C# has the following predefined numeric types.
C# type 
System type 
Suffix 
Size 
Range 

Integral—signed  



 



 



 





Integral—unsigned  



 



 










Real  















Of the integral types, int
and
long
are firstclass citizens and C# and the runtime
favor both. The other integral types are typically used for interoperability or when space
efficiency is paramount.
Of the real number types, float
and double
are called floatingpoint
types and are typically used for scientific calculations. The decimal
type is typically used for financial calculations, where
base10accurate arithmetic and high precision are required.^{[1]}
Integral literals can use decimal or hexadecimal notation;
hexadecimal is denoted with the 0x
; prefix. For
example:
int x = 127; long y = 0x7F;
Real literals can use decimal and/or exponential notation. For example:
double d = 1.5; double million = 1E06;
By default, the compiler infers a numeric ...
No credit card required