We need minimum and maximum values in your program, such as by using int.MaxValue and int.Min. Every integer or typed number in the C# language has a specific max value, but that number is different for int, uint, short, and ushort.
Field | Value | Reference |
short.MaxValue | 32767 | Reference |
short.MinValue | -32768 | Reference |
ushort.MaxValue | 65535 | Reference |
ushort.MinValue | 0 | Reference |
int.MaxValue | 2,147,483,647 | Reference |
int.MinValue | -2,147,483,648 | Reference |
uint.MaxValue | 4,294,967,295 | Reference |
uint.MinValue | 0 | Reference |
long.MaxValue | 9,223,372,036,854,775,807 | Reference |
long.MinValue | -9,223,372,036,854,775,808 | Reference |
double.MinValue | negative 1.7976931348623157E+308. | Reference |
double.MaxValue | positive 1.7976931348623157E+308 | Reference |
|