4 static int AddABunchOfShorts (__arglist)
8 System.ArgIterator iter = new System.ArgIterator (__arglist);
9 int argCount = iter.GetRemainingCount();
11 for (int i = 0; i < argCount; i++) {
12 System.TypedReference typedRef = iter.GetNextArg();
13 result += (short)TypedReference.ToObject( typedRef );
19 static int AddABunchOfBytes (__arglist)
23 System.ArgIterator iter = new System.ArgIterator (__arglist);
24 int argCount = iter.GetRemainingCount();
26 for (int i = 0; i < argCount; i++) {
27 System.TypedReference typedRef = iter.GetNextArg();
28 result += (byte)TypedReference.ToObject( typedRef );
34 public static int Main () {
35 if (AddABunchOfShorts (__arglist ((short)1, (short)2, (short)3)) != 6)
38 if (AddABunchOfBytes (__arglist ((byte)4, (byte)5, (byte)6)) != 15)