title: Convert string to double or float c#
body: <p>I need to convert a string to double. Or float, whatever suits best for this type of conversion.</p>
  
  <p>The string is "25.00".</p>
  
  <p>How would I convert this string so that I can use it in calculations?</p>
  
  <p>I've tried with:</p>
  
  <pre><code>string s1 = "2";
  string s2 = "25.00";
  
  double d1 = Convert.ToDouble(s1);
  double d2 = Convert.ToDouble(s2);
  double d3 = d2 * d1;
  </code></pre>
  
  <p>I've also tried with this:</p>
  
  <pre><code>string s1 = "2";
  string s2 = "25.00";
  
  double d1 = double.Parse(s1);
  double d2 = double.Parse(s2);
  double d3 = d2 * d1;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>string s1 = "2";
  string s2 = "25.00";
  
  float f1 = float.Parse(s1);
  float f2 = float.Parse(s2);
  float f3 = f2 * f1;
  </code></pre>
  
  <p>None of this seem to work, I get a formatexception.</p>