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) |
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. |