Difference between a class and struct in .net

Thought I will share some interesting differences between a .net class and a struct. Class Struct Allocated on the heap. Allocated on the stack. They are value types and don’t require heap allocation. A variable of a class type stores a reference to a dynamically allocated object. A variable of a struct type directly stores […]
Continue reading…