title: C# float.Parse losing precision
body: <p>I'm having some trouble to convert data taken in my database to float numbers. Basically, the application is rounding one of my values to one decimal house. The table contains a set of fields with monetary values and one of these values te application keeps rounding. The strangest thing is that, despite the fact that there are more float values on my database, just one of them is rounded (valorAtualizadoAcordo). So, this is my query:</p>
  
  <pre><code>SELECT 
      idAcordo,
      tipoAcordo,
      valorAtualizadoAcordo,
      dataAtualizacaoAcordo,
      valorConfessadoAcordo,
      valorAcordo,
      valorEntradaAcordo,
      valorParceladoAcordo,
      quantidadeParcelasAcordo,
      taxaAcordo,
      atualizacaoTrAcordo,
      dataPrimeiraParcelaAcordo,
      dataUltimaParcelaAcordo,
      dataAssinaturaAcordo,
      dataAprovacaoAcordo,
      primeiraDataAbertoAcordo,
      dataProtocoloAcordo,
      tipoProtocoloAcordo,
      cadastroDspsAcordo,
      dataSolicitacaoAcordo,
      contabilizadoAcordo,
      dataLancamentoAcordo,
      contratoDevolvidoAcordo,
      dataDevolucaoAcordo,
      volumetriaAcordo,
      pagamentoRealizadoDataAcordo,
      contratoAntesAjuizamentoDataAcordo 
  FROM 
      acordo 
  WHERE 
      FK_idContrato = 46;
  </code></pre>
  
  <p>And this is my convertion:</p>
  
  <pre><code>ac.setValor(float.Parse(acd.Rows[i][5].ToString(), CultureInfo.InvariantCulture));
  </code></pre>
  
  <p>The value I'm trying to retrieve from the database is 325,360.69. I'm converting it to PT-BR format, what gives me "325360,7" (in Brazil, we use "," instead of "." to define the decimal floating point).</p>