David Smith

David Smith

  • NA
  • 2k
  • 0

C# Set precision

Nov 4 2011 3:14 AM
I want to set the precision or make sure i am getting the precision by 2 decimal points, at the moment once I read in the value, its rounded off to the nearest dollar if you know
what i mean.

Can some assist me. I want to set the precision by two decimal places.

  if (reader["PRICE"] != DBNull.Value)
  {
  Row.PRICE= Convert.ToDecimal(reader["PRICE"]);
  }

Answers (11)