Home > DeveloperSection > Forums > String Join Method in c#
Ankit Singh

Total Post:341

Posted on    December-07-2015 9:57 PM

 C# C#  String 

 1 Reply(s)
 755  View(s)
Rate this:
I want to use String Join Method  in c# please help me.

aditya kumar Patel

Total Post:254

Posted on    December-07-2015 9:59 PM

The string.Join method combines many strings into one. It receives two arguments: an array or IEnumerable and a separator string. It places the separator between every element of the collection in the returned string.

using System;

class Program
    static void Main()
        string[] arr = { "aditya", "pawan", "pankaj","suresh","sunil","suman","vrijesh","vikash","manoj" };

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


Don't want to miss updates? Please click the below button!

Follow MindStick