Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将项列为字符串_C# - Fatal编程技术网

C# 将项列为字符串

C# 将项列为字符串,c#,C#,我想问一下,是否可以将列表项更改为一个字符串 List<string> example = new List<string>(); example.Add("1"); example.Add("2"); example.Add("3"); string text = "123"; 这是给你的 string s = string.Join("", example ) 在你提出问题之前,你应该设法找到解决办法。顺便说一句,您也可以使用string.Concatexampl

我想问一下,是否可以将列表项更改为一个字符串

List<string> example = new List<string>();
example.Add("1");
example.Add("2");
example.Add("3");
string text = "123";
这是给你的

string s = string.Join("", example )

在你提出问题之前,你应该设法找到解决办法。顺便说一句,您也可以使用string.Concatexample