开发者

Math.Round(decimal) Problem

开发者 https://www.devze.com 2022-12-25 20:11 出处:网络
Ok this is new, Math.Round(1.5) returns 2, i need 1. How to handle this? [EDITED] I know its the elementa开发者_如何学编程ry default way, i need the opposite.

Ok this is new, Math.Round(1.5) returns 2, i need 1.

How to handle this?

[EDITED] I know its the elementa开发者_如何学编程ry default way, i need the opposite.

Wrong typing meaning.

Any Suggestions?


You can adjust the result.

See: http://msdn.microsoft.com/en-us/library/ef48waz8.aspx


Try Math.Floor() or Math.Ceiling() ...?

0

精彩评论

暂无评论...
验证码 换一张
取 消