Tag Archives: difference between struct and class in C#

What is difference between Structure and class?


  • It is reference type.
  • Null value can be assigned to a variable in a class.
  • It can have destructor.
  • All variables in classes are by default private.
  • Good to be used from architecture view as it provides high flexibility.


  • It is value type.
  • Null value assignment is not feasible here.
  • Cannot have destructor.
  • All variables in structures are public.
  • Good to be used for simple data structures.