what is Difference between Struct and Class
- Struct are Value type and are stored on stack, while Class are Reference type and are stored on heap.
- Struct “do not support” inheritance, while class supports inheritance. However struct can implements interface.
- Struct should be used when you want to use a small data structure, while Class is better choice for complex data structure.
Comments