c get to the closest to 0.5 code example Example: round to nearest half Math.Round(value * 2, MidpointRounding.AwayFromZero) / 2