C# で文字列内の 1 つの部分文字列を別の部分文字列に置き換えるには、 を使用します。 Replace() メソッド。次の 2 つの使用例があります。
Replace(char old, char new) -  char old が char new に置き換えられます。 
Replace(string old, string new) -  string old は string new で置き換えられます。つまり、複数の文字を置き換えることができます。 
C# でのインライン置換の例:
string phone = "+1-234-567-89-10";
// ハイフンはスペースに変更されます
string edited_phone =phone.Replace("-", "  ");
// +1 234 567 89 10