【发布时间】:2012-07-25 20:29:29
【问题描述】:
可能重复:
Merging two arrays in .NET
How do I concatenate two arrays in C#?
如何合并两个 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"};。这可能吗?如果结果必须进入一个新的字符串数组,那很好;我只是想知道如何实现它。
【问题讨论】:
标签: c# .net arrays string c#-2.0