public string ReplaceLetters(string wordToSearch, char letterToFind, char letterToReplace) { StringBuilder word = new StringBuilder(wordToSearch); int index = 0; foreach (char letter in wordToSearch) { if (letter.Equals(letterToFind)) { word.Remove(index, 1); word.Insert(index, letterToReplace); } index++; } return word; }