0
学习如何Create a method with infinite parameters后,我想知道将参数数组存储到数组中是否合法。它会导致任何问题,因为我没有看到很多人使用这种方法。下面C#有无限参数的方法数组访问
代码:
class Foo
{
private String[] Strings;
public Foo(params String[] strings)
{
Strings = strings;
}
...
}
备注:它不是无限的 - 数组的最大大小为int.MaxValue –