Join string

Join method from string type is a static method which concatenate an array of string with delimiter.

It does the opposite of Split method.


using System;

class Sample
{
    public static void Main()
    {
        string[] arr = new string[] { "JAVA", "2", "s", ".com" };

        string s = string.Join(" ", arr);

        Console.WriteLine(s);
    }
}

The output:


JAVA 2 s .com
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.