StringBuilder append : StringBuffer StringBuilder : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » StringBuffer StringBuilder »

 

StringBuilder append









    


using System;
using System.Text;
   
class Test {
  public static void Main() {
    StringBuilder myStringBuilder = new StringBuilder();
    string myString = "www.navioo.com";
    myStringBuilder.Append(myString);
    myStringBuilder.Append(", www.navioo.com... ");
    int myInt = 1234;
    myStringBuilder.Append(myInt);
    bool myBool = true;
    myStringBuilder.Append(myBool);
   
    myStringBuilder.Append('z', 5);
   
    myStringBuilder.Append("Here's another string", 0, 4);
   
    Console.WriteLine("myStringBuilder = " + myStringBuilder);
  }
   
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» StringBuffer StringBuilder