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
Substitute a hyphen for the dash:
var climateString = "−2.8".Replace ("−", "-"); var number = double.Parse(climateString);
(You might want to be on the lookout for other strange characters coming out of that database, though.)