2
In languages such as PHP 5.6 and Python, it is possible to define "infinite arguments", (in PHP it is called variadic args) in a function/method.
For example, it is possible to 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#? It is advantageous in any case?
And if there is, as is the Omega in C#?
You also have http://php.net/manual/en/function.func-get-arg.php in php. So you don’t even need to force any arguments
– Miguel
I quoted that in question :p
– Wallace Maxters
OPPS did not see that it referred to this method
– Miguel