String Join Method in c#

Total Post:341


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

    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));


      Modified On Apr-10-2018 06:26:41 AM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.