Is there a way to get the following function declaration?
public bool Foo<T>() where T : interface;
where T : class
public bool Foo<T>() where T : IBase;
The closest you can do (except for your base-interface approach) is "
where T : class", meaning reference-type. There is no syntax to mean "any interface".
where T : class") is used, for example, in WCF to limit clients to service contracts (interfaces).