using System;
public class FindAndReplaceAllOccurrencesOfASubstringInAString_CSharp
{
public static void Main(string[] args)
{
string str = "java php go c python php phpphphp php rust";
string word = "php";
string replacewith = "C#";
str = str.Replace(word, replacewith);
Console.WriteLine(str);
}
}
/*
run:
java C# go c python C# C#C#hp C# rust
*/