Append('A ').Append('B ').Append('C... ') : StringBuilder : String C# Examples


C# Examples » String » StringBuilder »

 

Append('A ').Append('B ').Append('C... ')









    
using  System;
using  System.Text;

public  class  MainClass
{
        static  void  Main()  {
                StringBuilder  sb  =  new  StringBuilder();

                sb.Append("A  ").Append("B  ").Append("C...  ");

                string  built1  =  sb.ToString();

                sb.Append("D");

                string  built2  =  sb.ToString();

                Console.WriteLine(  built1  );
                Console.WriteLine(  built2  );
        }
}
    
   
  
   



Output

A B C...
A B C... D


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» StringBuilder