Dividing with precision in vb.net
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
精彩评论