In languages such as PHP 5.6 and Python , you can define "infinite arguments" (in PHP it is called vadicadic args ) in a function / method
For example, you can define a function like this in PHP 5.6:
function variadic($name, ...$args) {
echo $name;
foreach ($args as $key => $value) {
echo $value;
}
}
variadic('name', 1, 2, 3, 4, 5, 6);
That is, from the second argument on, we can pass "infinite" arguments to the function.
Is there any way to do this in C #? Is it advantageous in some case?
And if so, what is the C # naming?