Since the double type stores binary numbers, it may not be possible to accurately hold values below the decimal point. Let's add each value 1000 times.

```
double[] val = { 18527.475, 28527.475, 38527.475 };
foreach (double value in val) {
double sumValue = 0;
for (int i = 0; i < 1000; i++) {
sumValue += value;
}
Console.WriteLine(sumValue);
}
18527474.999999903
28527475.00000046
38527475.00000072
```

Use decimal type.

```
decimal[] val = { 18527.475m, 28527.475m, 38527.475m };
Console.WriteLine("Rounded values are:");
foreach (decimal value in val)
Console.WriteLine("{0} == {1}", value, Math.Round(value, 2,
MidpointRounding.AwayFromZero));
Rounded values are:
18527.475 == 18527.48
28527.475 == 28527.48
38527.475 == 38527.48
```