Obtained a wrong value when converting a value to integer.

EswaranEswaran INMember ✭✭

When using the following code var value = Convert.ToInt32(System.Math.Floor(4.1 - 0.1)); i obtained a wrong value. Instead of 4 i got 3. Any one please help me to resolve this issue or please suggest me a possible solution to resolve this issue. I have attached a sample to replicate the issue.

Tagged:

Best Answer

Answers

  • EswaranEswaran INMember ✭✭

    Hi @kentucker ,

    Thanks for your valuable solution :) .

Sign In or Register to comment.