I want that user write what ever string he wish (one word or whole sentence) and then I want to find each “in” and replace it with “ter” but before replacing it, the position of each “in” should be printed.
Console.Write("Write some string: ");
string s1 = Console.ReadLine();
s1 = s1.Replace("in", "ter");
Console.WriteLine("After replacement we got new string {0}!", s1);
Console.ReadKey(true);
You are looking for
IndexOf.