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 256 views
1 answer 291 views
1 answer 283 views
1 answer 263 views
1 answer 293 views
1 answer 223 views
1 answer 229 views
...