SyntaxFix
Write A Post
Hire A Developer
Questions
You can use a different overload of Replace() that takes string.
Replace()
val = val.Replace("-", string.Empty)