f.Func4 (1, 2, 3, 4, 9, 6, 7);
public void Func4 (params int[] arr)
{
for (int i = 0; i < arr.Length; i++) {
Console.WriteLine (arr [i]);
}
}
f.Func4 (1, 2, 3, 4, 9, 6, 7);
public void Func4 (params int[] arr)
{
for (int i = 0; i < arr.Length; i++) {
Console.WriteLine (arr [i]);
}
}
本文标题:c# params 传数组不限个数
本文链接:https://www.haomeiwen.com/subject/gqrgnxtx.html
网友评论