This example demonstrates the Math.Round() method in conjunction
// This example demonstrates the Math.Round() method in conjunction // with the MidpointRounding enumeration. using System; class Sample { public static void Main() { decimal result = 0.0m; decimal posValue = 3.45m; decimal negValue = -3.45m; // By default, round a positive and a negative value to the nearest even number. // The precision of the result is 1 decimal place. result = Math.Round(pos..
C#
2011. 8. 1. 16:17