Classes versus structures

This section compares classes and structures:

  • Inheritance enables one class to inherit the characteristics of another
  • Type casting enables us to check and interpret the type of a class instance at runtime
  • De-initializers enable an instance of a class to free any resources it has assigned
  • Reference Counting allows more than one reference to a class instance
  • Structures are value types so they are always copied when they are passed around in code
  • Structures do not use Reference Counting
  • Classes are reference types
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset