让我举个例子:
我有一些通用的类/接口定义:
interface IGenericCar< T > {...}
我有另一个类/接口,我想与上面的类相关,例如:
interface IGarrage< TCar > : where TCar: IGenericCar< (**any type here**) > {...}
基本上,我希望我的通用IGarrage依赖于IGenericCar,无论是否,IGenericCar<int>或者IGenericCar<System.Color>因为我对该类型没有任何依赖性.