I'm curious as to why we cannot consume the following method:
void Foo(Bar[] items);
With:
Foo(new Bar());
It would compile and work if the method signature included params
void Foo(params Bar[] items);
I'm sure there are obvious (to some) reasons, I cannot think of any.
EDIT: I understand how the params keyword works - maybe not completely at a low level. I am asking why do we need the keyword params, what are the reasons preventing this implicit cast by default? Granted, this can just be considered a feature request for more syntactic sugar. It may also be expensive for the compiler to include this by default and the cost-benefit isn't there. If so, that's my answer. Maybe my idol Mr. Lippert has a logical reason or can simply say; not possible. Until then, my curiosity get's the better of me.