我有一个接口模式如下(C# .NET4)
interface A
{
}
interface B
{
List<A> a;
}
interface C
{
List<B> b;
}
我是这样实现的:
public interface A
{
}
public interface B<T> where T : A
{
List<T> a { get; set; }
}
public interface C<T> where T : B
{
List<T> b { get; set; } // << ERROR: Using the generic type 'B<T>' requires 1 type arguments
}
我不知道如何避免出现错误“使用泛型类型'B'需要1个类型参数”
。