C Sharp Programming/Keywords/params

The keyword is used to describe when a grouping of parameters are passed to a method, but the number of parameters are not important, as they may vary. Since the number isn't important, the keyword must be the last variable in a method signature so that the compiler can deal with the parameters which have been defined first, before dealing with the params.

Here are examples of where it will, and will not work:

A good example of this is the method. The method allows a user to pass in a string formatted to their requirements, and then many parameters for the values to insert into the string. Here is an example:

The String.Format method has taken a string, and replaced the {0}, {1}, {2} with the 1st, 2nd and 3rd parameters. If the keyword did not exist, then the  would need an infinite number of overloads to cater for each case.