C#声明方法,不参数数目时
程序员文章站
2022-05-04 11:51:28
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"); }