Thread: Multiple inheritance in C#

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Plano, Texas, United States

    Multiple inheritance in C#

    Does anyone know how to accomplish multiple inheritance in C#? Or possibly any resources that can help me? I know that it is not supported, but I am sure some must have found some kind of work around.

    I have seen suggestions to use interfaces (since you can inherit from multiple interfaces), but in this case that is simply just not possible.

    I have a class called ColorPickerAdorner which derives from another class called UserControl (WPF/Silverlight) and also my own class called Adorner. Adorner is an abstract class. UserControl is a normal class.

    Any suggestions?
    My Website

    "Circular logic is good because it is."

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Maybe rethink why your class has to be both a control and an adorner? Look into composition.

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 06-08-2009, 03:03 PM
  2. references and multiple inheritance - incompatible?
    By m37h0d in forum C++ Programming
    Replies: 11
    Last Post: 09-03-2008, 02:35 PM
  3. Multiple Inheritance - Size of Classes?
    By Zeusbwr in forum C++ Programming
    Replies: 10
    Last Post: 11-26-2004, 09:04 AM
  4. Multiple Inheritance Ambiguity
    By FillYourBrain in forum C++ Programming
    Replies: 21
    Last Post: 08-23-2002, 10:31 AM
  5. Multiple virtual inheritance
    By kitten in forum C++ Programming
    Replies: 3
    Last Post: 08-10-2001, 10:04 PM