1. The structure cannot create a constructor without Parameters
2. The structure is generated in the stack, and the class is generated in the heap stack.
3. assign values to each other in the structure. A new structure can be created. The classes assign values to each other, but the references are copied.
4. From the execution efficiency point of view, the stack execution efficiency is higher than that in the heap stack, but in reality, the stack is only suitable for the execution logic.
And heap can execute more complex business logic.
5. The structure cannot derive interfaces like a class.
6. The structure cannot be inherited like a class.
7. The default constructor without parameters is provided in the structure and cannot be replaced. The class also provides constructor without parameters. However
Xu replacement.
8. There is no destructor in the structure, and there is a destructor in the class.
9. keywords such as sealed, abstract, and virtual are not allowed in the structure.
10. The structure cannot be modified using protected.
11. The structure Cannot initialize instance fields.
12. The structure can specify how fields are laid out in the memory. The class is not.
13. Do not try to construct too many methods in the structure. It is best not to define a method unless it is defined.
14. constants must be initialized during declaration.
15. There are two types of constants in c #: Compile-time constant and dynamic constant.
(Runtime constant ).
16. Static constants are defined by the const keyword, and dynamic constants are defined by readonly.
17. const defines that the constant type must be a value type, except string.
18. Dynamic Constants can be defined in Constructor
19. For constants that cannot be declared using const, you can use static readonly to declare
20. The essence of a variable is the memory unit that stores various types of data.
21. is used to determine whether a variable is of a certain type