I. Value types and reference types
1. Value types: References to reference types for all value types and reference types are stored on the stack
Value type Assignment principle: The true value copied on the stack
2. Reference type:
1> properties of real objects stored on the heap on the real object itself
2> heap on open space storage data
the memory address on the 3> heap is stored in the stack space
4> from the stack to the real object on the heap
Two. Structure
1. Method 5 Elements
1> return value type
2> access Modifiers
3> Method Name
4> method Body
5> Method Parameters
2. Use of structures
1> can be used without a new direct definition of the structure of the object
2> declaration must assign an initial value to a member of a struct
Three. Crating and unpacking
Four. Different types of parameter passing
1> when a value type parameter is passed using value mode (without ref decoration), the modification of the parameter in the method does not persist
2> when a reference type parameter is passed using a value method (without ref decoration), the modification of the parameter in the method is preserved
3> when a value type is passed by reference (without ref decoration) or when a reference type parameter is passed, the modification of the parameter in the method is preserved
Drill down into C # data types