--- VB. NET Single & Double ---
Single precision
First, let's briefly explain: the project contains an amount of content, the first single, and later found that only the amount in the (-100000.66, 1000000.66) range can actually store the corresponding value, the tested code is as follows:
The second digit 6 after the decimal point starts to carry, for example, 100000.66 becomes 100000.7
1 Private Sub button#click () Sub button#click (ByVal sender As System. Object, ByVal e As System. EventArgs) Handles Button1.Click
2 Dim a As Single
3 a = TextBox1.Text
4 Label1.Text =
5 End Sub
To Double:
Test successful
1 Private Sub button#click () Sub button#click (ByVal sender As System. Object, ByVal e As System. EventArgs) Handles Button1.Click
2 Dim a As Double
3 a = TextBox1.Text
4 Label1.Text =
5 End Sub
So the type of the amount should be set to Double, cough.
--- End ---