Params is an important keyword in C#
. It is used as a parameter which can take the variable number of arguments
Important Point About Params Keyword :
- It is useful when programmer don’t have any prior knowledge about the number of parameters to be used.
- Only one Params keyword is allowed and no additional Params will be allowed in function declaration after a params keyword.
- The length of params will be zero if no arguments will be passed.
To illustrate the use of params keyword
Share your thoughts in the comments
Please Login to comment...