Mega Code Archive

 
Categories / C# / Development Class
 

Removes the specified range of characters from this instance

using System; using System.Text; class Sample  {     public static void Main()      {         string str =   "The quick brown fox jumps over the lazy dog.";         StringBuilder sb = new StringBuilder(str);             Console.WriteLine("Original value:");         Console.WriteLine("{0}", sb.ToString());              sb.Remove(10, 6); // Remove "brown "         Console.WriteLine("{0}", sb.ToString());     } }