A2 10th assignment operator and Implementation Adder Calculator

Source: Internet
Author: User

Chapter II, section 10th
1, there can be only one variable on the left, and the left must be a variable
2, Calculator WinForm
1, drag the control (one button, two label, two textbox)
2, double-click Write event for button
3,result
4, get the input text information
5, select the button, switch to the lightning bolt check Click
6, write method to click event
7,
{
String S1=txtnum1.text;
String S2=txtnum2.text;
String s=s1+s2;
Labelresult.text=s;
}


8, converts the input string to an integer addition
{
String S1=txtnum1.text;
String S2=txtnum2.text;
int I1=convert.toint32 (S1);
int i2=convert.toint32 (s2);
int result=i1+i2;
Labelresult.text=convert.tostring (Result)//result. ToString (); //result integer value converted to String type
}

A2 10th assignment operator and Implementation Adder Calculator

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.