1. Stack and stack
Stack is an advanced data structure that allocates memory space during compilation. Therefore, the size of the stack must be clearly defined in your code. Each pointer in the stack (when the variable is run) points to a memory area or space in the stack.
Heap is directly in the memory area. It develops memory for Stack reference. Usually, the built-in variable is that the value type is stored in the stack. Other objects provided by the. NET Framework, or the reference type defined by ourselves, are generally created in the heap and referenced by the stack variables. It is the memory space dynamically allocated during the program running. You can determine the heap memory size to be allocated based on the program running status.
Stack stores: Value Type, reference type "Address"
STACK: refers to the reference type "object" or the actual value of the reference type. It can be empty.
2. Value Type and reference type
Value Type: numeric type, which inherits from System. ValueType.
Reference Type: Class interface delegate Object string, all of which are inherited from System. Object
3. Empty type
An error is returned when you finish coding in.
Add one after the DateTime type?
This is an empty type.
An empty type can represent all values of the basic type, and a null value. An empty type can be declared in either of the following ways:
1. System. Nullable <T> variable
2. T? Variable
T is the basic type that can be empty. T can be any value type including struct, but cannot be a reference type.
Above ......