public static void Main()
string text = "The quick brown fox jumps over the lazy dog";
text = text.Replace("fox", "horse");
Console.WriteLine("The length of the 'text' is {0} characters", text.Length);
text = text.Substring(4, 17);
Console.WriteLine("The text starting at index 4, containing 17 characters is {0}", text);
text = "The quick brown fox jumps over the lazy dog";
Console.WriteLine("The index of the word 'brown' is {0}", text.IndexOf('b'));
text = text.Insert(39, ", barking");
Console.WriteLine("I have removed the word 'dog' to give {0}",text);
string[] substring = text.Split(delimeter);
foreach (var word in substring)
text = "The quick brown fox jumps over the lazy dog";
Console.WriteLine("The original string is - {0}", text);