5 static public void method (int nargs
, string arg
) {
7 Console
.WriteLine ("Got single arg "+arg
);
9 static public void method (int nargs
, params string[] args
) {
11 Console
.Write ("Got "+nargs
.ToString()+" args ");
12 Console
.WriteLine ("("+args
.Length
.ToString()+"):");
13 for (i
= 0; i
< nargs
; ++i
)
14 Console
.WriteLine (args
[i
]);
16 public static int Main() {
18 method (2, "hello", "World");
19 method (3, "hello", "World", "blah");