日期:2014-05-17  浏览次数:20866 次

数组如何拼接呢?
C# code
List<string>  one = new List<string>{"0102","0103","0104"};
List<string>  target = new List<string>{"0506070809"};



怎么拼接呢?

C# code
for (int i = 0; i < one.Count; i++)
{
     target.Union(one[i]); 
     target.Concat(one[i]);
}




两种写法都不对,正确的写法是什么呢?谢谢

------解决方案--------------------
target = one.Concat(target).ToList();
------解决方案--------------------
List<string> one = new List<string>{"0102","0103","0104"};
List<string> target = new List<string>{"0506070809"};
string result = string.Join("", one.Concat(target).ToArray());