--- 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 ---
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.