I seem to be having some trouble wrapping my head around the idea of a Generic List of Generic Lists in C#. I think the problem stems form the use of the
A quick example:
List> myList = new List>();
myList.Add(new List { "a", "b" });
myList.Add(new List { "c", "d", "e" });
myList.Add(new List { "qwerty", "asdf", "zxcv" });
myList.Add(new List { "a", "b" });
// To iterate over it.
foreach (List subList in myList)
{
foreach (string item in subList)
{
Console.WriteLine(item);
}
}
Is that what you were looking for? Or are you trying to create a new class
that extends List
that has a member that is a `List'?