C#合并字符串数组

string[] hidenumber = HiddenField1.Value.Split(',');
string[] phonenumber = txtPhoneNum.Text.Trim().Split('\r');

string[] moble = new string[hidenumber.Length + phonenumber.Length];

int index = 0;
for (int i = 0; i < hidenumber.Length; i++) {
moble[index]
= hidenumber[i];
index
++;
}

for (int j = 0; j < phonenumber.Length; j++) {
moble[index]
= phonenumber[j];
index
++;
}
posted @ 2011-03-15 10:24  许明吉博客  阅读(6518)  评论(0编辑  收藏  举报