更新:2007 年 11 月
错误消息
params 参数必须是形参表中的最后一个参数。下面的示例生成 CS0231:
// CS0231.cs
class Test
{
public void TestMethod(params int[] p, int i) {} // CS0231
// To resolve the error, use the following line instead:
// public void TestMethod(int i, params int[] p) {}
static void Main()
{
}
} | |