I\'m coding a peace of code that extracts some data from a DB. And the problem is that I want to convert a negative number string \"−2.8\" to a double. Pretty easy, I though
I would suggest to use TryParse instead of Parse method because it gently handle you error if any.
Code -
var test1 = "-123.95"; decimal result; decimal.TryParse(test1, out result);
you'll get parsed double value in result.