I have a generic interface where the type constraint is an abstract base class.
So the implementations may be of different implementations.
Although this is fine, when I try to return a concrete implementation (such as ITestImplementation) from a method which is set to return the interface (eg ITest), this throws various compile time errors in Visual Studio about implicit casts.
Code:
ITest<Control>
{
void Execute();
}
I use this interface in various places and return a method as above. Maybe I should use a generic type placeholder.
Is this not possible?
Thanks