Hi,
This issue is documented in the "Double.ToString Method" official link
below:
http://msdn2.microsoft.com/en-us/library/system.double.tostring.aspx
"By default, the return value only contains 15 digits of precision although
a maximum of 17 digits is maintained internally. If the value of this
instance has greater than 15 digits, ToString returns
PositiveInfinitySymbol or NegativeInfinitySymbol instead of the expected
number. If you require more precision, specify format with the "G17" format
specification, which always returns 17 digits of precision, or "R", which
returns 15 digits if the number can be represented with that precision or
17 digits if the number can only be represented with maximum precision."
So, you should use "R" or "G17" format string, like this:
Dim dblX As Double = 146785.62713610753
Dim strText As String = dblX.ToString("G17")
This works well on my side. Furthermore, the link below contains the most
complete document for numeric type:
"Standard Numeric Format Strings"
http://msdn2.microsoft.com/en-us/library/dwhawy9k.aspx
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.