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 160 views
1 answer 207 views
1 answer 178 views
1 answer 161 views
1 answer 196 views
1 answer 132 views
1 answer 207 views
...