2009-04-03 6 views

Répondre

14

String.Join

2
String.Join() 
24
string mergedString = String.Join(" ", stringArray); 
+5

+1 pour la réponse complète –

0

Supposons qu'il y ait un numéro de téléphone comme:

string str = "^^^^^546^64767"; 
string resultString = String.Join("-", str.Split(new string[] { "^" }, StringSplitOptions.RemoveEmptyEntries)); 

vous pouvez donc rejoindre comme ça.

0

chaîne merge = Chaîne.Concat (stringArray);