Category
| Bits
| Type
| Range/Precision
|
Signed integral | 8 | sbyte | –128...127 |
16 | short | –32,768...32,767 | |
32 | int | –2,147,483,648...2,147,483,647 | |
64 | long | –9,223,372,036,854,775,808...9,223,372,036,854,775,807 | |
Unsigned integral | 8 | byte | 0...255 |
16 | ushort | 0...65,535 | |
32 | uint | 0...4,294,967,295 | |
64 | ulong | 0...18,446,744,073,709,551,615 | |
Floating point | 32 | float | 1.5 × 10−45 to 3.4 × 1038, 7-digit precision |
64 | double | 5.0 × 10−324 to 1.7 × 10308, 15-digit precision | |
Decimal | 128 | decimal | 1.0 × 10−28 to 7.9 × 1028, 28-digit precision |
lock statement | class Account public void Withdraw(decimal amount) { |
using statement | static void Main() { |
goto statement | static void Main(string[] args) { |
return statement | static int Add(int a, int b) { static void Main() { |
yield statement | static IEnumerable<int> Range(int from, int to) { static void Main() { |
throw and try | static double Divide(double x, double y) { static void Main(string[] args) { |
checked and unchecked statements | static void Main() { |