I want to make a List containing a List that contains strings. I don't know how to do that. Can I get a code example please?
Printable View
I want to make a List containing a List that contains strings. I don't know how to do that. Can I get a code example please?
You already have the answer in your title. ;-)
A little example
Debug and see what's in the doubleStringListCode:List<List<string>> doubleStringList = new List<List<string>>();
List<string> tempList = new List<string>();
tempList.Add("list1");
doubleStringList.Add(tempList);
List<string> tempList2 = new List<string>();
tempList2.Add("list2");
tempList2.Add("list2secondItem");
doubleStringList.Add(tempList2);
haha I was to quick to ask has just missed the () :D!! Thank you!!