Convert an array to string

前端 未结 3 373
悲哀的现实
悲哀的现实 2020-12-13 11:43

How do I make this output to a string?

List Client = new List();
foreach (string listitem in lbClients.SelectedItems)
{
    Clien         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 12:17

    You can join your array using the following:

    string.Join(",", Client);
    

    Then you can output anyway you want. You can change the comma to what ever you want, a space, a pipe, or whatever.

提交回复
热议问题