Performance Implications of Inheritance RRS feed

  • Question

  • I see some references to perfomance issues when using inheritance in  Can someone please clarify the performance considerations?  I have a base class.  The original plan was to have all classes in our project inherit from this base class.  Now, we are thinking of creating a class that inherits from the base class and from which some of our classes will inherit.  We will create another class that inherits from our base class for other classes to inherit from.  IE we are grouping classes into sub-types. 

    At what point does the inheritance hierarchy cause performance issues?  It appears that in .NET, many of the objects have several levels of inheritance. (For example, the TextBox, which inherits from TextboxBase, then from Control then from Component, then from MarshallByRefObject and then Object.)

    Thanks to all for answers.



    Friday, December 28, 2012 8:32 PM