1. In the main () function, we call the test () function, and we call the main () function the caller, and the tube test () function is called the called Person.
If the callee wants to get the caller's value: 1), pass the parameter. 2), use static fields to simulate global variables.
If the caller wants to get the value of the callee: 1), the return value
2, whether it is a real parameter or a formal parameter, is in the memory of open space.
3, the method must be a single function. Getmax (int n1,int n2) method is the most taboo is the word that prompts the user input.
4, out, ref, params 1), out parameters. If you are returning multiple values of the same type in a method, you might consider returning an array.
However, if you return a number of different types of values, the return array will not work, then we can consider using the out parameter.
The out parameter focuses on the ability to return several different types of values in a method.
2), ref parameter can take a variable into a method to change, after the change is completed, then the change of the value of the method. The ref parameter requires that a value be assigned outside the method, and the method may not be assigned a value.
3), params variable parameter The elements of the argument list that are consistent with the variable parameter array type are treated as elements of the array. The params variable parameter must be the last element in the formal parameter list.
5. Overloaded concept of methods: overloading of methods means that the name of the method is the same, but the parameters are different.
Parameters differ in two cases 1), and if the number of arguments is the same, then the type of the parameter cannot be the same. 2), if the parameters of the same type, then the number of parameters can not be the same.
The overloads of the method are not related to the return value.
6, the method of the recursive method itself calls itself. Find all the files in a folder.
C # Knowledge Point collation