Numeric types

The following table lists the numeric types in C#:

C# typeSystem typeSizeRange
sbyteSystem.SByte8 bits-27 to 27-1
shortSystem.Int1616 bits-215 to 215-1
intSystem.Int3232 bits-231 to 231-1
longSystem.Int6464 bits-263 to 263-1
byteSystem.Byte8 bits0 to 28-1
ushortSystem.UInt1616 bits0 to 216-1
uintSystem.UInt3232 bits0 to 232-1
ulongSystem.UInt6464 bits0 to 264-1
floatSystem.Single32 bits+/- (~10-45 to 1038)
doubleSystem.Double64 bits+/-(~10-324 to10308)
decimalSystem.Decimal128 bits+/- (~10-28 to 1028)
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.