Difference between classes and structure?

Difference between classes and structure?

  • Class is Reference Type and Structure is value type.
  • Class object is stored in heap and structure object is stored in stack.
  • Class support inheritance and structure does not support can inheritance.
  • Classes have destructor but structure does not allow destructor.
  • Classes and structure both can implements the interfaces.

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + 7 =


All Rights Reserved 2019 | DesignzRush (OPC) Pvt. Ltd.
Inline
Inline