I'm implementing a set of classes and corresponding interfaces where I want each class to have a set of common properties and a set of specialised properties that are specific only to that class. So, I'm considering defining interfaces along the lines of:
interface ICommon {...} // Members common to all widgets
interface IWidget1 {...} // specialized members of widget type 1
interface IWidget2 {...} // specialized members of widget type 2
I am trying to choose between having the inheritance in the interfaces, or in the class. So, specifically, I can either do it like this:
interface IWidget1 : ICommon {...}
interface IWidget2 : ICommon {...}
class Widget1 : IWidget1 {...}
class Widget2 : IWidget2 {...}
...or like this...
class Widget1: ICommon, IWidget1 {...}
class Widget2: ICommon, IWidget2 {...}
Is there any compelling reason to go one way or the other?
Update: Would it affect the answer if the classes must be COM-visible?