I was wondering if there was a method in which I can hold a generic list that can hold a generic list.
My issue is that I have a list that can hold either LIST A or LIST B or LIST C.
I figured out how to do this with Data types but I want this list to be able to hold classes that I create.
For example:
List<T> listA = new List<T>();
Where T is ObjectX
listA.Add(new list<Y> { new List<U>() { new List<T>() } } );
Where Y is ObjectY<br>
Where U is ObjectU
etc.
EDIT: Let me put it into context.
I have a list of Objects called Suites Each Suite can have a list of CaseObjects OR a list of CaseHolderObjects. Each CaseHolder can hold a list of CaseObjects Each Case can hold a list of ActionObjects
>` where `BaseClass` is either an abstract class or interface. I'd suggest doing a bit more research about object oriented programming and inheritance.
– PJvG Mar 21 '17 at 13:36>>>` ? or did I miscount?=!
– Mong Zhu Mar 21 '17 at 13:45