Skip to content
Loading
  • Jignesh Kumar
    0
    Hi,
     
    Please refer this thread,
    https://www.c-sharpcorner.com/UploadFile/9b86d4/how-to-round-a-decimal-value-to-2-decimal-places-in-C-Sharp/ 
    0
  • 0

    You're all getting it wrong. In the source excel file the RATE/UNIT column data doesn't have the value after one decimal place, so using Math.Round wouldn't do the job it will simply convert 97.8 to 97.80 and so on. Please check the expected values I mentioned in my 1st reply.

    0
  • Sachin Singh
    -1
    you can use 
    C#
    Math.Round(val, 2)
    1. var roundValue=Math.Round(Rate/Unit, 2);  
     
    -1