J
John
I am just starting to use asp.net and I do not have the
ToDecimal function. Do I have to install a library to
get it?
ToDecimal function. Do I have to install a library to
get it?
John said:I am just starting to use asp.net and I do not have the
ToDecimal function. Do I have to install a library to
get it?
Carl Prothman said:John,
You can convert to a double by either using the Double's Parse method
or VB.NET's CType (or C# Convert).
Dim s1 As String = "1.1"
Dim d1 As Double = Double.Parse(s1)
Dim d2 As Double = CType(s1, Double)
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
he said about Double will also work for Decimal. (
CarlsMessage.Replace("Double", "Decimal") should take care of it
<grin>)