可能重複:
Merging two arrays in .NET
How do I concatenate two arrays in C#?在.NET/C#2.0中合併兩個字符串數組?
我怎麼能合併兩個string[]
變量?
例子:
string[] x = new string[] { "apple", "soup", "wizard" };
string[] y = new string[] { Q.displayName, Q.ID.toString(), "no more cheese" };
我想補充這兩個這樣的x
的內容是:依次{"apple", "soup", "wizard",Q.displayName, Q.ID.toString(), "no more cheese"};
。這可能嗎?如果結果必須進入一個新的字符串數組,這很好;我只想知道如何讓它發生。
http://stackoverflow.com/questions/2788636/array-concatenation-in-c-sharp – Bert 2012-07-25 20:40:39