效果如下:
附代码:
cs
public static void List()
{
List<int> list = new List<int> { 1,3,5};
List<int> list2 = new List<int> { 2, 4,6 };
"\n原始list为:\n".Print();
list.ForEach(x=>x.Print());//var listrange =
list.AddRange(list);
"\naddrange后list为:\n".Print();
list.ForEach(x => x.Print());
}