Number of data types: System. compatible with CLS? With or without symbols
Sbyte 8 SByte No
Ushort 16 UInt16 No
Uint 32 UInt32 No none
Ulong 64 UInt64 No
Byte 8 Byte is none
Short 16 Int16 has
Int 32 Int32 has
Long 64 Int64 is available
In C #, the integer type of the variable is mainly divided into the above classes.
The signed integer and byte types belong to the general language Authentication System (CLS. The unsigned integer does not belong to CLS.
You can use the original type keyword (such as int) or the corresponding alias (such as System. Int32). Both methods are feasible. The only exception is that when you use the type name as the real parameter of the. net framework function, you can only use System. Int32, but not int. For example, you must call: Type. GetType ("System. Int32"), and the Type. GetType ("int") statement is incorrect. This is because int Is only a keyword in C #, And. net framework functions are designed to be common in all. net languages. Note that byte is unsigned in C.
Note: byte and sbyt have only eight bits, so they cannot be used as array elements because the minimum size of array elements is 16 bits (2 bytes ).
Author: ershouyage