As I understand it, params is just syntactic sugar that “under the hood” simply gives you an array of the type you specify.
First, when would you use this?
Second, why would you use it instead of just declaring an array argument?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Math.Mintakes exactly two arguments. This is a stupid limitation. Many other languages allow you to write:If you wanted to write a
minfunction that could be used like that, you’d want to useparams.