11
Answers

C# Set precision

David Smith

David Smith

13y
9.5k
1
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)