tags:

views:

74

answers:

4

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
+1  A: 

Use List.AddRange to add one list to another.

ho1
+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
A: 
List<string> list1 = new List<string>() { "rabbit", "hat" };
List<string> list2 = new List<string>() { "frog", "pond" };
list2.InsertRange(0, list1);
BrokenGlass