我尝试写看起来像这样为什么这个通用接口定义是错误的?
public interface IPropertyGroupCollection
{
IEnumerable<IPropertyGroup> _Propertygroups { get;}
}
public interface IPropertyGroup
{
IEnumerable<IProperty<T, U, V>> _conditions { get; }
}
public interface IProperty<T, U, V>
{
T _p1 { get; }
U _p2 { get; }
V _p3 { get; }
}
public class Property<T, U, V> : IProperty<T, U, V>
{
//Some Implementation
}
我不断获取编译错误的_Conditions的IEnumerable的定义一个接口。
我在做什么错了? 理念是实现类将成为一个通用的属性包集
用'object'替换所有泛型和你设置。 – ja72 2012-07-13 06:16:30