C#声明方法,不参数数目时
程序员文章站
2022-10-03 23:05:02
class TestClass { public static void test(params int[] array) { string s;foreach (int i in array) { Console.WrriteLine(i); } } } public static void Ma ......
class testclass
{ public static void test(params int[] array) { string s;foreach (int i in array) { console.wrriteline(i); } } }
public static void main(string[] args) { testclass.test("a","b","c","d"); }
下一篇: js权威指南学习笔记(二)表达式与运算符