在C#中,当一个泛型参数从另一个泛型参数继承时,定义泛型类很简单,例如:
public class MyClass<TClass, TInterface> where TClass : class, TInterfaceStartup在没有泛型约束的情况下'S实现'I的问题是,没有什么可以阻止编写类似于:.UseStartup<Startup<EchoWcfService, string>>()之
在C#中,我可以定义一个只将应用于参数化泛型的扩展方法。public static bool fun(this List<int> coll, int x) return coll.Contains(x);我在F#中尝试了同样的方法,但没有办法做到当然可以定义如下所示的泛型扩展方法 member o.x s = o.Contains s
并附带说明,使扩展方法在C#中可用。但这不是问题所在。我关心的是参数化的