Hi,
First, convert it to a
String
, then you can use
String.Split
method to split the string:
Dim d As Double = 13.23
Dim s As String = Convert.ToString(d)
Dim strArray As String() = s.Split("."C)
Dim beforeDecimalPoint As String = s(0)
Dim afterDecimalPoint As String = s(1)
And if you want to set the text of
label1
to the part before the decimal point, and to set the text of
label2
to the part after the decimal point, try this:
label1.Text = beforeDecimalPoint
label2.Text = afterDecimalPoint
Hope this helps.