using System; using System.Linq; using System.Diagnostics; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string str = "+123-456/7890"; var onlyNumbers = Convert.ToInt64(new String(str.Where(Char.IsDigit).ToArray())); } } }