First, your code doesn't add all of the elements in one list to another list. It merely returns ONE of the specified lists.
Second, why don't you use the
List.AddRange
method instead (if you really want to combine the lists)?
List<string> list1 = new List<string>();
List<string> list2 = new List<string>();
list1.AddRange(list2.ToArray());
Now, if you're trying to add the actual values in one list to the values in the other list, I would write an extension method instead:
public static void AddIntValues(this List<int> me, List<int> other)
{
int max = Math.Min(me.Count, other.Count);
for (int i = 0; i < max; i++)
{
me[i] += other[i];
}
}
This is, admittedly, a pretty bizarre requirement.