I have been working on a system for a while now, and the client has been testing it. They want the system to now Round up keeping two decimal places. Can someone help as i seem to be having trouble with Math.Ceiling
and converting the numbers to decimal. My code is below.
Line 2 is where the change needs to be made and the figure needs to round up keeping 2 decimal places.
float fcharge = Convert.ToSingle(dr["total_charge_weight"]) * Convert.ToSingle(dr["H_unit_rate"]);
decimal dcharge = Math.Round(Convert.ToDecimal(fcharge), 2);
float charge = Convert.ToSingle(dcharge);