I have this string: \"123-456-7\"
I need to get this string: \"1234567\"
How I can replace occurrences of \"-\" with an empty string?
String.Replace Method (String, String)
in your case it would be
string str = "123-456-7"; string tempstr = str.Replace("-","");