i have a 4 list in c# how i can make a list from them. means to say make a list from the result of 4 list.
+1
A:
Your question isn't very clear, but I suspect you mean something like:
List<List<string>> stringLists = ...;
// SelectMany is a "flattening" operation
List<string> singleList = stringLists.SelectMany(list => list).ToList();
Jon Skeet
2010-09-23 12:27:29
+4
A:
You can also use the List constructor to achieve this.
Something like
List<string> list1 = new List<string>();
List<string> list2 = new List<string>();
List<string> list3 = new List<string>();
...
List<string> concat = new List<string> (list1.Concat(list2).Concat(list3));
astander
2010-09-23 12:29:58
A:
List<string> list1 = new List<string>() { "rabbit", "hat" };
List<string> list2 = new List<string>() { "frog", "pond" };
list2.InsertRange(0, list1);
BrokenGlass
2010-09-23 12:31:53