[VB. NET] Single & Double

Source: Internet
Author: User
 
--- 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 ---

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.