亚洲区国产区激情区无码区,国产成人mv视频在线观看,国产A毛片AAAAAA,亚洲精品国产首次亮相在线

LINQ 串聯(lián)運(yùn)算符 Concat

Concat()方法附加兩個(gè)相同類型的序列,并返回一個(gè)新序列(集合)。

IList<string> collection1 = new List<string>() { "One", "Two", "Three" };
IList<string> collection2 = new List<string>() { "Five", "Six"};

var collection3 = collection1.Concat(collection2);

foreach (string str in collection3)
    Console.WriteLine(str);
輸出:
One
Two
Three
Five
Six
IList<int> collection1 = new List<int>() { 1, 2, 3 };
IList<int> collection2 = new List<int>() { 4, 5, 6 };

var collection3 = collection1.Concat(collection2);

foreach (int i in collection3)
    Console.WriteLine(i);
輸出:

1
2
3
4
5
6

C?;騐B.Net中的查詢語(yǔ)法不支持Concat運(yùn)算符。