Private Sub btnDecToInt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDecToInt.Click
Dim value As Integer
Dim quantity As Decimal
value = 5
quantity = 0.3
quantity = Convert.ToDecimal(value)
MessageBox.Show(quantity.GetType.ToString)
End Sub
Private Sub btnIntToDec_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIntToDec.Click
Dim X As Integer
Dim Y As Decimal
X = 1
Y = 0.1
X = Convert.ToInt16(Y)
MessageBox.Show(X.GetType.ToString)
End Sub
End Class
Wednesday, January 26, 2011
Converting Into to Dec and Dec to Int
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment