1. Define and use functions
A function is a method, code block function names that can be executed in any part of the application are generally written in the form of PascalCasing. The Void keyword indicates that the function has no return value. 2. The return value is Static <returnType> <functionName> (){.... Return <returnValue >;} 3. Static <returnType> <functionName> (<paramType> <paramName> ,....) {.... Return <returnValue>} each parameter has a type and a name separated by commas. 1. Parameter Matching when calling a parameter, the parameter must be exactly the same as the parameter specified in the function definition. 2. The parameter array C # allows you to specify one (only one) for the function) A specific parameter. This parameter must be the last parameter in the function definition. It is called a parameter array and is defined by the keyword params. 3. the reference parameter and value parameter use the ref keyword to specify the variables that the reference parameter uses as the ref parameter has two restrictions: 1. variables must be used in function calls. 2. initialized variables must be used.