Monday, July 13, 2009

Passing parameter by param

The params keyword lets you specify a method parameter that takes an argument where the number of arguments is variable.

Params parameter is a very useful feature in C#. It is used when we don't know the number of parameters will be passed to the called method.

Param can accept multiple values or "params" should be a single dimensional or a jagged array.

Practical demonstration of passing parameter by param

See full detail:

No comments: