V
Vagabond Software
Here is the code:
Dim amountDue As Double
amountDue = Math.Round(DirectCast(strOrderTotal, Double), 2)
This code produces an invalid cast exception. The String variable
strOrderTotal evaluates to "226.27".
Is it not valid to cast a string to a double? I don't want to use CType
because it is my understanding that CType is not CLS compliant. Is that
correct?
carl
Dim amountDue As Double
amountDue = Math.Round(DirectCast(strOrderTotal, Double), 2)
This code produces an invalid cast exception. The String variable
strOrderTotal evaluates to "226.27".
Is it not valid to cast a string to a double? I don't want to use CType
because it is my understanding that CType is not CLS compliant. Is that
correct?
carl