1. class is a reference type, and struct is a value type.
1. When copying a variable that contains a structure, copying the data will not change the old copy for any modifications made to the new copy;
2. The class is a reference type, and the replication between classes is just a copy reference;
2. class supports inheritance. struct has no inheritance. It cannot inherit from another structure or class, nor itself can it be inherited. It is an implicit sealed, but it supports interface inheritance;
Iii. Internal differences
Iv. Usage
1. Implement a struct function to store data;
2. struct occupies the stack space, so it is only applicable to small data storage;
3. structure data is more efficient;
4. Low Cost of structure when structures represent objects such as vertices, rectangles, and colors;
5. Classes are the best choice for presentation of abstract and multi-level objects;
6. In most cases, this type is only the best choice for some data.
By: dxh_0829