© { JSL }
33
Text Box: params type[ ]
params type[ ]
Folded Corner:
·C# supports variadic functions
wparams keyword can be used on array parameter
wonly on a single dimension array parameter
static void GreyHole(params int[] row)
{
    if (row != null)
        Console.WriteLine(row.Length);
    else
        Console.WriteLine("null");
}
static void Main()
{
    GreyHole(null);
    GreyHole();
    GreyHole(1);
    GreyHole(new int[]{1, 2});
    GreyHole(1,2,3);
}
null
0
1
2
3
params is not part of the signature