title: Exception while parsing negative double numbers in C#
body: <p>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 thought. I tried first with: </p>
  
  <pre><code>var climateString = "−2.8";
  var number = double.Parse(climateString);
  </code></pre>
  
  <p>With this result:</p>
  
  <pre><code>An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
  </code></pre>
  
  <p>So I thought again, searched on google, and got new answer:</p>
  
  <pre><code>var climateString = "−2.8";
  var styles = NumberStyles.AllowParentheses | NumberStyles.AllowTrailingSign |NumberStyles.Float | NumberStyles.AllowDecimalPoint;
  var rit = double.Parse(climateString, styles);
  </code></pre>
  
  <p>Epic fail again:</p>
  
  <pre><code>An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
  </code></pre>
  
  <p>I thought again, I cannot be so stupid as not to know how to do such a simple task. I tried this:</p>
  
  <pre><code> var climateString = "−2.8";
   var doue = Convert.ToDouble(climateString, CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>Yes, the exact same exception again. I started looking a the number, and, I realized on the negative sign. Look this number carefully  "−2.8" this is not a negative number this. This is a negative number "-2.8". Look at those signs again "----- −−−−−" not the same. Parsing a string with a different sign character throws an exception : S. So, anyone has an idea, how to parse it elegantly to a double number in C#? Thak you!</p>