开发者

Dividing with precision in vb.net

开发者 https://www.devze.com 2023-03-26 05:21 出处:网络
I have a fairly small double and a fairly large double. When I divide the large one by the small one and display it with Console.WriteLine, it alwa开发者_StackOverflow社区ys shows exponential notation

I have a fairly small double and a fairly large double. When I divide the large one by the small one and display it with Console.WriteLine, it alwa开发者_StackOverflow社区ys shows exponential notation. Can I display the non exponential notation form?


When you do Console.WriteLine it will use a default format for the given type. The same thing you'd get if you used ToString() explicitly. Have you tried specifying the format, as in number.ToString("D")?


If it helps, here are some examples with other specifiers:

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

0

精彩评论

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