[Solved] How to get the round off value of a decimal in C# [duplicate]


Simply

Math.Round(24.86)

This will round you value to 25.

Your own logic will be

decimal d = 1.5m;
decimal r = d - Math.Truncate(d);

if (r > 0)
     r = 1 - r;

decimal value = d + r;

solved How to get the round off value of a decimal in C# [duplicate]