At first see Int16, Int32, Int64 These three kinds of types feel a bit strange, why want the whole number end of, very strange.
Yesterday thought to each other, Ms so do is to let everyone at a glance know how much space this data type.
Int8, equal to Byte,
Int16, equal to short, accounts for 2 bytes. -32768 32767
Int32, equal to int, accounting for 4 bytes. -2147483648 2147483647
Int64, which is equal to a long, takes up 8 bytes. -9223372036854775808 9223372036854775807
In this way, it looks more intuitive than Short,int,long!
In addition, there is a byte, which is equal to Byte, 0-255.
So int8 16 32 64 is the alias of the short int long
1. We use String. Length reads string lengths, which are of type int, so theoretically int32.maxvalue is a string. The maximum value the Length can reach.
2. NET a single object in memory must not exceed 2GB, using Unicode encoded string type each character occupies 2 bytes, so the maximum length is 1,073,741,823. And this length is not sufficient in a 32-bit system.
The information has the talent in a realistic scientific rigorous attitude to test, ran to 1,000,000,000 after the tragedy, so the conclusion is able to more than 1,000,000,000, but then memory overflow. In fact, I also tested, but did not see up to a few on the memory overflow ...
C # and the database in the field type Int16 (short), Int32 (int), Int64 (long), the range of values, differences. String length