首页 > 代码库 > C# - params

C# - params

By using the params keyword, you can specify a method parameter that takes a variable number of arguments.

You can send a comma-separated list of arguments of the type specified in the parameter declaration or an array of arguments of the specified type. You also can send no arguments. If you send no arguments, the length of the params list is zero.

No additional parameters are permitted after theparams keyword in a method declaration, and only one params keyword is permitted in a method declaration.

C# - params