This is going to be hard to communicate so bare with me here...
Say I have a list of fruits organised in a list. The list is organized so that firstly the word 'person' will appear on the list and all proceeding items after that person are fruit that belong in their basket. Then the next person listed marks a parse moment to start a new list of fruits for a new person. Finally I want all these lists of fruits for all these people to be compiled into a list of lists. The number of fruits and number of people are unknown. However the types of fruits that can appear are known.
Here's an example list if the above doesn't make sense:
//create a new list of fruit for a person
while (notAtEndOfList && input != "person")
I would recommend using the following data structure to represent your data:
Dictionary<String, List<String>> MyData = new Dictionary<String, List<String>>();