C # data types include: Value Type and reference type.
Value Type:
Variables: from the user's perspective, variables are the basic unit for storing information. From the system perspective, a variable is a storage space in the computer memory.
C # value types include:
Simple Type (simply types)
Structure Type (struct types)
Enumeration types)
Simple Type: (simple variables, C # provide us with a set of simple types that have been defined)
Integer type: (distinguish between mathematical Integer Range and computer Integer Range)
C # There are nine integer types:
Data Type features
Sbyte signed 8-digit integer
Byte unsigned 8-digit integer
Short signed short integer
Ushort unsigned short integer
Int signed integer
Uint unsigned integer
Long signed long integer
Ulong unsigned long integer
Boolean Type:
Used to express true and false feelings. True and false are used in C #.
There is no conversion between the integer type and the boolean type.
Real Number Type:
Floating point type:
Decimals are represented in C # in two types: Float (double)
Decimal:
It is mainly used to facilitate the calculation of financial currency processing (in decimal form)
Define a decimal type, and add m at the end
Character Type: (char)
Unicode Character Set
Variable types in C # cannot be computed with integers.
Structure Type: (struct)
The process of organizing a series of related variables into a single entity is called the process of generating a structure.
There is no limit on the member types contained in the structure type.
Enumeration type: (Enum)
A set of logically inseparable integer values provide symbols that are easy to remember.
A variable of the enumeration type can have only one value at a time. By default, each element of the enumeration type is int.
Value assignment type: Long, Int, short, byte .....
In C #, the keyword is lower case