You can access minimum and maximum values for the various built-in numeric types from your code by using theMinValue and MaxValue properties of each type. All of the built-in numeric types have MinValue and MaxValueproperties.
1
2
3
4
5
6
7
8
| byte bMin = byte.MinValue; // 0byte bMax = byte.MaxValue; // 255int nMin = int.MinValue; // -2147483648int nMax = Int32.MaxValue; // 2147483647char cMin = char.MinValue; // 0x0000char cMax = char.MaxValue; // 0xffff |

