C # learning Note one

Source: Internet
Author: User

C # learning Note one

C # learning Note one ???? 1

1.???? Note ???? 3

1.1.???? ///is a document comment that is used for descriptions of classes and methods ???? 3

1.2.???? #region #endregion可以折叠代码???? 3

2.???? operator ???? 3

2.1.???? The + sign is used to connect strings between a string and another type ???? 3

2.2.???? placeholder ???? 3

2.2.1.???? a bit like%d%c in C ???? 3

2.2.2.???? first dig the pit, after the pits, the output order is related to digging the pit order ???? 3

3.???? data type ???? 3

3.1.???? decimal modifies the type of money ???? 3

3.2.???? string is a keyword in C #, and string is a common???? for the. NET Platform 3

4.???? naming rules ???? 3

4.1.???? start with the letter, @ underline ???? 3

4.2.???? The following can be underlined with any alphanumeric ???? 3

4.3.???? camel naming specification ???? 3

4.3.1.???? first letter to lowercase ???? 3

4.3.2.???? capitalize the first letter of each of the remaining words ???? 3

4.3.3.???? Many are used to name variables ???? 3

4.4.???? Pascal naming specification ???? 4

4.4.1.???? the first letter of each word is capitalized ???? 4

4.4.2.???? Many are used to name a class or method ???? 4

5.???? swaps two variables of type int, without using intermediate variables ???? 4

5.1.???? n1 = n1-n2???? 4

5.2.???? N2 = n1 + n2???? 4

5.3.???? n2 = n2-n1???? 4

6.???? Console io???? 4

6.1.???? The WriteLine is used to output ???? 4

6.2.???? ReadLine () is used to enter a string that returns the string type ???? 4

7.???? escape character ???? 4

7.1.???? \ t is used to align the ???? 4

7.2.???? \b is used to output a fallback, and it doesn't work at the beginning or end of a string ???? 4

7.3.???? \ r \ n is an escape character for a carriage return written to a file in Windows ???? 4

7.4.???? when using the file directory as a string, you want to use \???? 4

7.4.1.???? to use \ \???? 4

7.4.2.???? or with/???? 4

7.4.3.???? or use @???? before the string 4

8.???? the function of @ ???? 5

8.1.???? causes the escape function of a string to be canceled ???? 5

8.2.???? keep the spaces in the string enter and so on ???? 5

?

  1. Comments
    1. is a document comment that describes the classes and methods
    2. #region #endregion可以折叠代码
  2. Operator
    1. + is used to connect strings between a string and another type
    2. Placeholder
      1. Kind of like%d%c in C.
      2. First dig the pit, after the pits, the output order is related to the digging pit order
  3. data type
    1. decimal decorated with money types
    2. string is a keyword in C #, and string is common to the. NET platform
  4. naming convention
    1. camel naming convention
      1. first letter to lowercase
      2. Multiple names for variables
    2. pascal naming convention
      1. The first letter of each word is capitalized /li>
  5. Swaps two variables of type int, without using intermediate variables
    1. N1 = N1-n2
    2. N2 = n1 + N2
    3. N2 = N2-n1
  6. Console IO
    1. WriteLine Used to output
    2. ReadLine () to enter a string that returns a string type
  7. escape character
    1. \t used to align
    2. Span style= "FONT-FAMILY:CALIBRI; font-size:12pt ">\b used for output fallback, not at the beginning or end of the string
    3. \r\ N is the escape character for the carriage return of a file written in Windows
      1. to use \
      2. or with/
      3. or before string with @
  8. The role of @
    1. Causes the escape function of a string to be canceled
    2. Keep the spaces in the string enter and so on

C # learning Note one

Related Article

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.