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
++ ;
}

你可能感兴趣的:(字符串)