Why do you think you should have the 00? 101.00=101. And 101 happens to be
what happens when the tostring method is called in this case (which is
called implicitly, since you are not doing it explicitly).
If you want the decimal places to always show up, you should use custom
format strings to ensure that the formatting to your liking - otherwise you
will get default behavior. But I am not sure why you feel there is something
wrong with the default behavior.
"Jason" <ja***@hotmail. com> wrote in message
news:t9******** *************** *********@4ax.c om...
In VB.NET, when I use System.Convert. ToDouble(string Val) to convert a
string variable to double variable, I got something interesting:
Dim stringVal As String = "101.01"
Dim doubleVal As Double
doubleVal = System.Convert. ToDouble(string Val)
Msgbox (doubleVal) will return 101.01
but......
Dim stringVal As String = "101.00"
Dim doubleVal As Double
doubleVal = System.Convert. ToDouble(string Val)
Msgbox (doubleVal) will return 101
where is the ".00" ?
Should I get 101.00 instead of 101?
Did I missed something here?
TIA