Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ee0bc0d176
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (23 sloc) 0.566 kb
using System;
class Class1
{
static int AddABunchOfInts (__arglist)
{
int result = 0;
System.ArgIterator iter = new System.ArgIterator (__arglist);
int argCount = iter.GetRemainingCount();
for (int i = 0; i < argCount; i++) {
System.TypedReference typedRef = iter.GetNextArg();
result += (int)TypedReference.ToObject( typedRef );
}
return result;
}
static int Main (string[] args)
{
int result = AddABunchOfInts ( __arglist ( 2, 3, 4 ));
Console.WriteLine ("Answer: {0}", result);
if (result != 9)
return 1;
return 0;
}
}
Jump to Line
Something went wrong with that request. Please try again.