The .NET Framework is huge and I still frequently find new things in .NET 2.0 which I had not seen before. Last week I stumbled across the update in Math.Round(...).In .NET 1.x the .NET Framework would only support the American way of rounding numbers. This means that:
decimal y = 2.5M;decimal x = Math.Round(y, 0); // x = 2
For Dutch people this wrong. We would expect x to be '3'.In .NET 2.0 there is a new overload, allowing you to specify how the Round method should work.
decimal y = 2.5M;decimal x = Math.Round(y, 0, MidpointRounding.AwayFromZero); // x = 3!