1, * program debugging
1), after the completion of a program, want to look at the implementation of this procedure.
2), when you finish writing this program, found that the program did not follow the way you think to do.
Debugging method:
1), F11-by-statement debugging (single-Step debugging)
2), F10 process debugging
3), breakpoint debugging
2. For loop
Grammar:
for (expression 1; expression 2; expression 3)
{
Circulation body;
}
Expression 1 is generally declared as a loop variable, the number of times the loop is recorded (int i=0;)
Expression 2 is generally a cyclic condition (i<10)
Expression 3 is usually the code that changes the loop condition so that the loop condition ceases to be true one day (i++).
Execution procedure: The program first executes expression 1, declares a loop variable used to record the number of cycles,
The expression 2 is then executed to determine if the loop condition is true, and if the expression 2 returns the result
The loop body is executed. When the loop body is executed, the expression 3 is executed, and then the expression 2 continues to determine whether the loop condition is true, and if so, the loop body is executed, and if not, the for loop is popped up.
3, Int. TryParse
Int.parse
An attempt was made to convert a string to an int type.
4, three-dimensional expression
Grammar:
Expression 1-expression 2: expression 3;
Expression 1 is typically a relational expression.
If the value of expression 1 is true, then the value of expression 2 is the value of the entire ternary expression.
If the value of expression 1 is false, then the value of expression 3 is the value of the entire ternary expression.
Note: The result type of expression 2 must be the same as the result type of expression 3, and also consistent with the result type of the entire ternary expression.
C#.net's fifth day study