views:

1168

answers:

1

Is there a way to do the opposite of String.Split in .Net? That is, to combine all the elements of an array with a given separator.

Taking ["a", "b", "c"] and giving "a b c" (with a separator of " ").

UPDATE: I found the answer myself. It is the String.Join method.

+7  A: 

Found the answer. It's called String.Join.

robintw
Did you know you can mark your own answer as the correct one?
Kev
But not for a day or so...
Marc Gravell
Yeah, it's 48 hours till I can mark it as accepted.
robintw
Still, you got (at current) 70 points and a self-learner badge ;-p
Marc Gravell
Brb asking and answering a very easy question...
Will
Ah...ok bad, RTFF.
Kev
This question helped me. I was about to ask the same thing and the "related" search led me here.
JCCyC
MARK IT AS ANSWER!!!
Shimmy