5 static int AddABunchOfInts (__arglist)
9 System.ArgIterator iter = new System.ArgIterator (__arglist);
10 int argCount = iter.GetRemainingCount();
12 for (int i = 0; i < argCount; i++) {
13 System.TypedReference typedRef = iter.GetNextArg();
14 result += (int)TypedReference.ToObject( typedRef );
20 static int Main (string[] args)
22 int result = AddABunchOfInts ( __arglist ( 2, 3, 4 ));
23 Console.WriteLine ("Answer: {0}", result);