using System.Text;
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder("This book");
string s = "is completed";
Console.WriteLine("Length of the stringbuilder {0} is {1}",sb,sb.Length);
Console.WriteLine("Capacity of the stringbuilder {0} is {1}",sb,sb.Capacity);
Console.WriteLine("StringBuilder before appending is {0}", sb);
Console.WriteLine("StringBuilder after appending {0} is {1}",s,sb.Append(s));
Console.WriteLine("stringbuilder after inserting now is {0}",sb.Insert(11,"now"));
Console.WriteLine("StringBuilder after removing 'is' is {0}",sb.Remove(8,3));
Console.WriteLine("Stringbuilder replacing all 'o' with 'x' is {0}", sb.Replace('o', 'x'));
Console.ReadLine();
}
}
}