The C # system namespace defines the basic types that can be used for local variables, member variables, parameters, and returned values. Corresponding keywords are matched in C.
Keywords |
System Type |
Range |
Description |
Bool |
System. Boolean |
True/false |
Indicates logical truth or false |
Sbyte |
System. sbyte |
-128 ~ 127 |
8-digit signed |
Byte |
System. byte |
0 ~ 256 |
Unsigned 8-digit |
Short |
System. int16 |
-32768 ~ 32767 |
16-digit signed |
Ushort |
System. uint16 |
0 ~ 65535 |
Unsigned 16-digit |
Int |
System. int32 |
-2147483648 ~ 2147483647 |
32-digit signed |
Uint |
System. uint32 |
0 ~ 4294967295 |
Unsigned 32-digit |
Long |
System. int64 |
-9223372036854775808 ~ 9223372036854775807 |
Signed 64-digit |
Ulong |
System. uint64 |
0 ~ 18446744073709551615 |
Unsigned 64-digit |
Char |
System. Char |
|
16-bit Unicode characters |
Float |
System. Single |
|
32-Bit Single-precision floating point number |
Double |
System. Double |
|
64-bit double-precision floating point number |
Decimal |
Decimal |
|
128 characters |
String |
System. String |
|
Indicates a combination of UNICODE character sets. |
Object |
System. Object |
|
All types of base classes |
In addition to string and object, the basic types are mostly struct, that is, the value type, and the memory is allocated to the stack.