合并2个数组解决办法
合并2个数组 string[] tempList strList.Split(|) string[] saveList (string[])Session[tempList
合并2个数组
string[] tempList = strList.Split('|');
string[] saveList = (string[])Session["tempList"];
怎样将saveList 数组 添加到tempList 中 使其成为一个数组。
谢谢解答
[解决办法]
string[] s1=new string[2]{"1","2"};
string[] s2 = new string[2] { "3", "4" };
string[] s3 = s1.Union(s2).ToArray();
[解决办法]string[] tempList = strList.Split('
[解决办法]');
string[] saveList = (string[])Session["tempList"];
string[] results = tempList.Union(saveList).ToArray();
[解决办法]var newary=ary1.Union(ary2).ToArray()
[解决办法]String[] str1 = {"a","b"};
string[] str2 = {"c","d"};
string[] c = new string[str1.Length + str2.Length];
str1.CopyTo(c,0);
str2.CopyTo(c,str1.Length);
foreach(string i in c)
{
Console.WriteLine("{0}",i);
}
Console.ReadLine();