using static System.Console;
public static void Main() {
var texto = "(99) 9999-9999";
WriteLine(texto.Replace("", '(', ')', '-', ' '));
public static class StringExt {
public static string Replace(this string str, string newValue, params char[] chars) {
var sb = new StringBuilder();
foreach (var chr in str) {
if (!chars.Contains(chr)) sb.Append(chr);
else sb.Append(newValue);