我有两个基类:
class BaseCollection<T> where T : BaseCollectionItem
{
}
和
class BaseCollectionItem
{
}
这些是基类,稍后按以下方式进行子类化:
class MyCollection : BaseCollection<MyItem>
{
}
class MyItem : BaseCollectionItem
{
}
我想存储对集合的引用,该集合在BaseCollectionItem
. 我该怎么做?
class BaseCollectionItem
{
private ??? ownerCollection;
}