title: C#, problems with getting double values from MySQL database
body: <p>I have a MySQL database with the table "<code>Products</code>". A column in "<code>Products</code>" is called "<code>Price</code>" and has the datatype "<code>double</code>".</p>
  
  <p>I need to retrieve the values from that column, so I create a reader, etc.:</p>
  
  <pre><code>MySQLCommand cmd = new MySQLCommand("SELECT Price FROM Products", connection);
  MySQLDataReader reader = cmd.ExecuteReaderEx();
  
  if (reader.HasRows == true)
  {
    while (reader.Read() == true)
    {
      price = reader["Price"]).ToString();
    }
  }
  </code></pre>
  
  <p>Problem is that price isn't set to the expected value. If the value in the database is "299.95", price is set to "29995.0".</p>
  
  <p>Any idea why this is happening? And what can be done to fix it?</p>