The following table describes the C# built-in numeric value types, bytes, ranges, and their usages:
| sbyte | System.SByte | 1 | -128 to +127 | It is used for signed byte values. |
| byte | System.SByte | 1 | 0 to 255 | It is used for unsigned byte values. |
| short | System.Int16 | 2 | -32768 to +32767 | It is used for interoperation and other specialized uses. |
| int | System.Int32 | 4 | -2147483648 to +2147483647 | It is used for whole numbers and counters. |
| uint | System.UInt32 | 4 | 0 to 4294967295 | It is used for positive whole numbers and counters. |
| long | System.Int64 | 8 | -9223372036854775808 to +9223372036854775807 | It is used for large whole numbers. |
| float | System.Single | 4 | -3.402823E+38 to +3.402823E+38 | It is used for floating point numbers. |
| double | System.Double | 8 | -1.79769313486232E+308 to +1.79769313486232E+308 | It is used for precise floating point numbers. |
| decimal | System.Decimal | 16 | -79228162514264337593543950335 to +79228162514264337593543950335 | It is used for financial and scientific calculations that require precision numbers. |
Recent Comments