Use the addition operator (+) to concatenate strings : String : String C# Examples


C# Examples » String » String »

 

Use the addition operator (+) to concatenate strings









    
using  System;

class  MainClass
{

    public  static  void  Main()
    {
        string  myString6  =  "To  be,  "  +  "or  not  to  be";
        Console.WriteLine("\"To  be,  \"  +  \"or  not  to  be\"  =  "  +  myString6);
    }

}
    
   
  
   



Output

"To be, " + "or not to be" = To be, or not to be


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» String