String.Split的对面有隔板(.NET)隔板、String、Split、NET

2023-09-03 11:49:57 作者:不美不萌照样拽つ

有没有办法做到String.Split相反在.net中?即,到阵列的所有元素结合给定的隔板。

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.

以[一个,B,C],并给予ABC(以分隔符)。

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

更新:我发现自己的答案。这是的string.join 方法。

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

推荐答案

找到了答案。这就是所谓的String.Join.

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