Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What are the ranges of int?
What are the ranges of int?

int is an integer type in C#’s data type numeric type. Int occupies 4 bytes and 16 data bits in C# language, which is 64bit. The value range is?-2^31——2^31-1, that is, -2147483648——2147483647.

The value range of int refers to the specific value rather than the number of bytes it occupies. In the code int a=x, as long as the value of x is within the value range of int, it is correct. .

Extended information:

int defines an integer type, and bits refer to the number of binary digits. int index=52, the default number of digits is determined by the number of digits calculated. Now there are generally 32 and 64 digits. If the machine digits are 32, then 52 occupies 32 digits. In int a=23244, 23244 represents an integer, not a string. The number of digits cannot be calculated in this way, and it does not exceed int32.

Baidu Encyclopedia-INT