I am attempting to declare and use an interface like this:
public interface IItem<T>
{
string Name { get; set; }
T Value { get; set; }
}
This works fine until I attempt to create a list of these items. This fails to compile:
public interface IThing
{
string Name { get; }
IList<IItem<T>> ThingItems { get; }
}
so I am not certain where the issue is. The items value is not defined until runtime, and I need to have collections of the items. I figure that this is a fairly standard pattern, but I can not see where I am falling down.