I'd like do implement a generic function with the generic constraint that the Type passed in is an interface. Is this possible in C#? I have it working fine without the constraint, but the code will fail at runtime if it is not an interface, so I'd like to have the compile time checking.
public T MyFunction<T> where T : {any interface type} { return null; }