1. Notes: Logout, explanation
2. Single line://
Multiple lines:/**/
Documentation notes://press ENTER
Staple food to make sure that people see it.
3. Quick to expect: Ctrl+k+d, hold down CTRL, press K, lift quickly, and then press D (Press D when K has been lifted).
4. Before you run: Build---Build the solution, resolve the syntax errors first, and then automatically align the code.
5. Microsoft Fool tip: Ctrl+j, Java-like Alt +?
But relying too much on smart tips, because you first do the things written, so some commonly used to write their own.
6. Text selection: Previously in Java, select the previous line (cursor on the next line), press and hold the Shift+↑ key. Select File the contents of the home can be selected by Ctrl + A, you can also press the end key, then directly to the last file, at this time, it is equivalent to the cursor at the end of the line, and then shift+home all selected;
7.ctrl+k+c, comment, Ctrl+k+u, uncomment. The ctrl+k+d of the incident with a quick anticipation.
8. Fold the honor (that is, the code of the residence, but do not want to delete) code: At the beginning #region, then at least empty one lattice, can write comments, and finally write #endregion
after folding, the left line number that appears with a rectangular box of the + sign, put the mouse on the collapsed code can see the collapsed content.
The storage of variables in the 9.JSJ is similar to the room in the hotel, you need to stay at the existing room, right, guide the room number. Now you want to find someone to stay in a room, you need to find the address of the room (latitude and longitude, not remember, with the room number). Why need addresses because the same things are stored in different places.
corresponding to the computer, the address is a binary string related to the number of machine bits, this binary string is very difficult to remember, so there are variables, in order to distinguish the same program (hotel) different addresses, so the variable name (room number) cannot be the same.
For example: M1 himself to travel, stay single room, 101
M1 and F1 on business, stay in Double room, queen size bed, 201
M1 and M2 on business, stay in Double room, double bed, 301.
That is to say, different types of variables in the pure area are different, the size is different, the variable name is different.
So, when you store variables, determine the type of variable, how much space to allocate, and then determine the variable name to make it easier to find the variable.
Declaring variables, equivalent to opening a room, assigning value, equivalent to staying. That is, the variable is defined first and then initialized. In use.
10. Differences between strings and characters: the difference between lamb kebabs and mutton.
Type 11.string, char type is enclosed in single quotes, Char can have a Chinese character (some doubt, char is not a byte), two kanji or empty (") will report grammatical errors.
Decimal (Money type) is used to denote the bank's money and so on, the end must be added m, otherwise think the whole waking up, such as the decimal currency = 500m; Why not double village? The double effective decimal place is 15 to 16,decimal and is 28 to 29 bits.
For example, a person has hundreds of billions, scientific notation, many digits after the decimal point, less a decimal place, then the daily interest estimates will be millions of less.
1), integer type: int can only store integers and cannot store decimals.
2), decimal type: Double can store both integers and decimals, the number of digits after the decimal point 15~16 bits.
3), Money type: decimal: Used for the village of coarse money, the value behind the need to add a M.
4), String type: string, used to store multiple text, can also be stored empty, string type values need to be double quotation marks,
This double quote must be a double quote in the English half-angle state
5), character type: char, used to store a single character, up to, at least one character, cannot be stored empty.
The value of the character type needs to be enclosed in single quotation marks. Single quotation marks in the English half-width state.
12. Red wavy Line: Pre-pressure error, color filter wavy line: May be wrong (do not red light, may have an accident).
13.String University is OK, but the best string is lowercase.
14.html is case insensitive.
15. Placeholder: Multiple days, no effect (no error); If less days, an exception occurs. Not a symbol, but a format, Console.WriteLine ("I call {0}", name), written in double quotes, just like printf's output control and true output.
16. Exception: Similar to the bug that appears when playing the game, may think that may be unintentional (computer water).
17. Swap variables: For example a bottle of Sprite and a bottle of Coke, how to exchange, definitely need an empty bottle.
18. Swap variables: Do not intermediate variables. x = XY; y = x+y; x = y-x (swap int, char); If you are exchanging string types, you must have intermediate variables.
19. The transfer of clothes is still a character.
20.\b Backspace
21. On the console: \ n, to winos need \ r \ n
22. In the path string: string path = @ "F:\codes", @ Cancel \ transfer function, if \ More, with @ very convenient
[email protected] retain the original format output, such as Console.WriteLine (@ "Hello
123 "), then 123 is in the second row, and there are several spaces in front.
24. Placeholder small number reserved Two bits: {0:0.00}
C # Learning Notes (ii)