Possible Duplicate:
Multiple Inheritance in C#
I know that C# does not support multiple inheritance in classes.
However, I need to do add the feature of both ClassA and ClassB in MyClass:
public class ClassA
{
/* Third party class*/
}
public class ClassB
{
/* Third party class*/
}
public class MyClass : ClassA, ClassB
{
/*Compilation error*/
}
Is there any way I can achieve this?
If you cannot change
ClassAandClassBI suggest creating subtypes for these classes and then aggregating.