1)The structures are value types and the classes are reference types.So object of structure store in stack exactly like any other value type like an Integer, a double but object of class store in heap.Your can assigned null to class variable but you can't assigned null value to structure variable
2)Class support Inheritance but struct does not support so access modifier of a member of a struct cannot be protected or protected internal
3)You can use Destructor in a class but You can use it in a structure
4)When passing a class to a method, it is passed by reference. When passing a struct to a method, it's passed by value instead of as a reference.
5)Structs cannot contain explicit parameterless constructors but You can create in class
like
struct a
{
int result;
public b()//it is possible in class, no error will come
{
result = 5;
}
}
struct a
{
int result;
public b()//it is not possible struct,compile error will come
{
result = 5;
}
}
6)You can instance Field initializer of class but You can't do in structs
for example
class emp
{
public string name = "cheater"; //No synstax error
}
struct emp
{
public string name="cheater"; //No synstax error will come
}
7)structures can not be garbage collector so no memory management.
classes can be garbage collector because garbage collector works on heap memory