© { JSL }
34
Text Box: params object[ ]
params object[ ]
Folded Corner:
·params with object as the element type
wcreates a truly variadic function
wthanks to boxing
static void BlackHole(params object[] row)
{
    if (row != null)
        Console.WriteLine(row.Length);
    else
        Console.WriteLine("null");
}
static void Main()
{
    BlackHole(null);
    BlackHole();
    BlackHole(1M);
    BlackHole(new int[]{1,2});
    BlackHole(1, 2.0, "three");
}
null
0
1
1
3