StringBuilder.Insert : StringBuilder « System.Text « C# / C Sharp by API






StringBuilder.Insert

  
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);
    }
}

   
    
  








Related examples in the same category

1.new StringBuilder()
2.StringBuilder.Append
3.StringBuilder.AppendFormat
4.StringBuilder.Capacity
5.StringBuilder.GetType()
6.StringBuilder.Length
7.StringBuilder.Remove
8.StringBuilder.Replace
9.StringBuilder.ToString()