1. Parameter Array
Define code: Similar to a common function, a keyword params is added at the end of the parameter list.
Call Code: <Function Name> (<several parameters...>, <Parameter array value 1>, <parameter array value 2>, <parameter array value 3>... <Parameter array value n> );
Sample Code: // Defines a code with a parameter array. The function is to pass in the value in the parameter array and return the maximum value;
){
); // Call a function that contains an array of parameters.
2. Reference parameters and value Parameters
Definition code:Keyword ref is required for defining values.
Call code:In order to distinguish between calls of value-type parameters, we also need to use the ref keyword when passing variables into a function containing referenced parameters to demonstrate the difference;
){
);
Limitations of referenced parameters:Nothing can be perfect. The referenced parameters are also limited. It is actually a small rule of normal syntax.
3. Output Parameters
){
);