Third lesson operator

Source: Internet
Author: User

1, +-*/(arithmetic operator)

+ Number has two functions

When encountering numbers, just press the above + for example:

int i=2;

int j=3;

i + j is equal to 5

If a string is encountered, two strings are joined, for example:

String s= "abc";

String s2= "EFG";

The result of S + s2 is "ABCEFG"

3. Type conversion

int j = Int. Parse (t1. Text);//int. Parse (String) transforms a string into an orthopedic
int i =int. Parse (T2. Text);

int c = i + j;//two X-shaped addition

T3. Text = C.tostring ();//Call the ToString () method to convert the shaping to a string

Third lesson operator

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.