static int ConvertDoubletoIntProperly(double Number) { int i = Convert.ToInt32(Number + 0.6); //value 0.6 is up to you. Normally to be more accurate user used 0.5 return (i); }
Description
- The above coding used to convert from double to int with right round means for example value 1.5 will become 2, 1.4 will become 1.
- This coding normally used in math calculation, identify correct column in excel spreadsheet and many more.
- Method to used it. paste this coding and call it when you want to used it.
I need help and ideas to start a new website?
Contact us for more detail…
That is totally what i was searching for, thanks.