using the StringBuilder methods Replace, Insert, Append, AppendFormat, and Remove : StringBuilder : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » StringBuilder »

 

using the StringBuilder methods Replace, Insert, Append, AppendFormat, and Remove








    
 

using System;
using System.Text;

class UseSBApp {
    static void Main(string[] args) {
        StringBuilder sb = new StringBuilder("Pineapple");
        sb.Replace('e', 'X');
        sb.Insert(4, "Banana");
        sb.Append("Kiwi");
        sb.AppendFormat(", {0}:{1}", 123, 45.6789);
        sb.Remove(sb.Length - 3, 3);
        Console.WriteLine(sb);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» StringBuilder