In the method below is there a way to know if the type T implement a specific interface IMyInterface2
public IList<T> MyMethod<T>() where T : class, IMyInterface1
{
return myResult;
}
Update :
Then I use like this
MyMethod<MyClass>();
Myclass implement IMyInterface1 and IMyInterface2
MyMethod<MyClassB>();
Myclass implement IMyInterface1 and NOT IMyInterface2
Sure there is: