I have a method which takes params object[] such as:
void Foo(params object[] items) { Console.WriteLine(items[0]); }
When I pass two o
Another way to solve this problem (it's not so good practice but looks beauty):
static class Helper { public static object AsSingleParam(this object[] arg) { return (object)arg; } }
Usage:
f(new object[] { 1, 2, 3 }.AsSingleParam());