Mega Code Archive

 
Categories / C# Book / 01 Language Basics
 

0018 Numeric types

The following table lists the numeric types in C#: C# type System type Size Range sbyte System.SByte 8 bits -27 to 27-1 short System.Int16 16 bits -215 to 215-1 int System.Int32 32 bits -231 to 231-1 long System.Int64 64 bits -263 to 263-1 byte System.Byte 8 bits 0 to 28-1 ushort System.UInt16 16 bits 0 to 216-1 uint System.UInt32 32 bits 0 to 232-1 ulong System.UInt64 64 bits 0 to 264-1 float System.Single 32 bits +/- (~10-45 to 1038) double System.Double 64 bits +/-(~10-324 to10308) decimal System.Decimal 128 bits +/- (~10-28 to 1028)