|
-
February 4th, 2009, 05:12 AM
#1
[RESOLVED] List in a List? List<List<string>>
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?
-
February 4th, 2009, 05:26 AM
#2
Re: List in a List? List<List<string>>
You already have the answer in your title. ;-)
A little example
Code:
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);
Debug and see what's in the doubleStringList
-
February 4th, 2009, 05:44 AM
#3
Re: List in a List? List<List<string>>
haha I was to quick to ask has just missed the () !! Thank you!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|