How can I properly inherit a class (of another class and interfaces) that have a generic type with a generic type constraint (where)?
class A { }
class B { }
interface I { }
class C<T> where T : A, B, I { }
In this example A, B and I is treated as base for T. Inhertiance of 2 classes is not possible in C#.
But I want that A is Baseclass of the generic type T and B/I is baseclass/interface of C. How to do this?
As soon as I use the where-constraint for the generic type I cannot derive my class C anymore
1 Answer