How to use Join() method to combines many strings into one in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] arr = { "c#", "java", "c", "c++" };

            Console.WriteLine(string.Join(",", arr));
        }
    }
}

/*
run:

c#,java,c,c++

*/

 



answered Jan 19, 2017 by avibootz

Related questions

1 answer 143 views
1 answer 127 views
1 answer 123 views
1 answer 179 views
2 answers 214 views
1 answer 158 views
...