Differences between class and structure c#

Following are the differences between structure and classes

1. Structures are value type and Classes are reference type.
2. Structures can not have constructor or destructor. Classes can have both constructor and destructor.
3. Structures do not support Inheritance, while Classes support Inheritance

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.