Use the Join() method to join strings : String : String C# Examples


C# Examples » String » String »

 

Use the Join() method to join strings









    
using  System;

class  MainClass
{

    public  static  void  Main()
    {
        
        string[]  myStrings  =  {"To",  "be",  "or",  "not",  "to",  "be"};
        string  myString9  =  String.Join(".",  myStrings);
        Console.WriteLine("myString9  =  "  +  myString9);
    }

}
    
   
  
   



Output

myString9 = To.be.or.not.to.be


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» String