I am trying to achieve the following, however I am not sure if it is even possible.
I have the following 'base' entities
public abstract class BaseObject {}
public abstract class BaseCollection <T> : ObservableCollection<T> where T : BaseObject {}
I also have
public class Obj_1: BaseObject {}
public class Obj_1_collection : BaseCollection <Obj_1>
{
public Obj_1_Method_1 () {}
}
and
public class Obj_2: Obj_1 {}
Following the same logic as Obj_1, I want to have a Obj_2_collection. I want this collection to inherit from Obj_1_collection in order to access its methods e.g. Obj_2_collection.Obj_1_Method_1(). As I have it in my mind I am trying to do something like the following (in pseudocode):
public class Obj_2_collection : Obj_1_collection<Obj_2 extends Obj_1>
meaning that the Obj_2_collection can access Obj_1_collection, however the collection object it will be of type Obj_2