How to join string array elements into a string with C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        string[] arr = {"c#", "java", "c", "c++", "python"};
        
        string s = string.Join(" ", arr);

        Console.Write(s);
    }
}



/*
run:

c# java c c++ python

*/

 



answered Oct 31, 2020 by avibootz

Related questions

1 answer 255 views
1 answer 291 views
1 answer 282 views
1 answer 263 views
1 answer 292 views
1 answer 222 views
1 answer 229 views
...