Hi guys ,
This article describe the difference between a class and struct data type in C#.NET
A class is a reference type.
A class is a user defined data type that behaves like built in data type.
While instantiating a class, .NET runtime engine allocates memory for its instance in heap.
Classes support inheritance.
Variables of a class can be assigned as null.
Class can contain constructor/destructor.
A structure is a value type.
A structure is a user defined data type that behaves like built in data type.
In structure, memory is allocated on stack.
Structures do not support inheritance.
Structure members cannot have null values.
Structure does not require constructor/destructor and members can be initialized automatically.