convert string to double fails...

magmo

Member
Joined
Oct 19, 2006
Messages
14
Programming Experience
1-3
Hi

I try this code...

HTML:
Sub WriteDouble(ByVal x As Double, ByVal y As Double, _
ByVal Width As Double, ByVal Height As Double, ByVal sColor As String)
Dim iC, iM, iY, iK As Double
Dim MyArray() As String = sColor.Split(",")
iC = System.Convert.ToDouble(MyArray(0))
iM = CDbl(MyArray(1))
iY = CDbl(MyArray(2))
iK = CDbl(MyArray(3))
'Response.Write(MyArray(0))
Response.Write(iC.ToString)
Response.Write(iC & "<br>")
Response.Write(iM & "<br>")
Response.Write(iY & "<br>")
Response.Write(iK & "<br>")
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
WriteDouble(1, 2, 3, 4, ("0.2,0,0.6,1"))
End Sub


But the conversation from string to double fails, does anyone know why?



Best Regards
 
Back
Top