I do some math calculations. Here is my code:
decimal FirstYr = decimal.Round((first / second), 5);
If I pass first = 20 and second = 34 , I get the value 0.58824 in FirstYr . This is normal. Now I am doing this calculation here in LINQ :
ev.HiComm = (float)(FirstYr * 100);
HiComm is a float in DB , and this transfer value is calculated above: 58.824001312255859
Which I do not want this. I want to ev.HiComm = 58.824
What am I doing wrong here?
source share