For example, let's say we have a method
private void foo(int a, int b, int c)
{
// do something...
}
and some sort of list containing some values
List<int> Numbers = new List<int> {
8, 9, 10
};
My question is: Is it possible to pass the whole list as arguments for the declared method if it contains exactly the needed number of elements as the parameters, as in the example?
Something like ...
foo(Numbers);
foo(List<int> Numbers);