C# how do I make string from array of string?

梦想与她 提交于 2019-12-01 12:07:53

问题


Can you tell me an easy way to make a string from array of string?

I have:

String line = "how are you";
string[] split = line.Split(new Char[] { ' ' }); //{"how", "are", "you"}

How i can make back "String - How are you"? IT IS ONLY EXAMPLE, NOT REALITY :-) Thank you.


回答1:


Use this:

string.Join(" ", split);


来源:https://stackoverflow.com/questions/26315748/c-sharp-how-do-i-make-string-from-array-of-string

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!