public static IT Activate<IT>(string path) { //some code here.... }
我想设置通用IT必须只是一个接口.
这可能吗?
if (!typeof(IT).IsInterface) { // Presumably throw an exception }