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