what is the syntax for implementing an interface in a generic class
that has a constrained base class
example:
class myclass<T>: mybase<T> where T: IComparable
{
}
Now, I want myclass<T> to implement IMyInterface. What is the syntax
for this?
class myclass<T>:mybase<T> where T:IComparable, IMyInterface - doesnt
work because this says that the class 'mybase<T>' has an additional
constraint on T
class myclass<T>:IMyInterface, mybase<T> where T:IComparable - doesnt
work because base classes must come before any interfaces that are
implemented.
So how do I tell the compiler that I want myclass<T> to implement the
interface IMyInterface when it is a sub class of mybase<T> where T is
constained?