using System;
public class Program
{
public static string removeSpecificCharactersFromString(string str, char[] charsToRemove) {
foreach (char ch in charsToRemove) {
str = str.Replace(ch.ToString(), "");
}
return str;
}
public static void Main(string[] args)
{
string phone = "(555) 555-5555";
char[] charsToRemove = new char[] {'(', ')', '-'};
phone = removeSpecificCharactersFromString(phone, charsToRemove);
Console.WriteLine(phone);
}
}
/*
run:
555 5555555
*/