double testd = 3184.39995117187;
double nd = Math.Round(testd, 2); // 3184.4
nd = Math.Round(testd, 2, MidpointRounding.AwayFromZero);// 3184.4
nd = Math.Round(3184.367, 2); // 3184.37
nd = Math.Round(3184.365, 2); // 3184.36
nd = Math.Round(3184.367, 2, MidpointRounding.AwayFromZero); //3184.37
nd = Math.Round(3184.365, 2, MidpointRounding.AwayFromZero); //3184.37
网友评论