Mono Class Library: System.ArgIterator Overview | MembersSystem.ArgIterator Constructor |
Initialize an ArgIterator using a base address. [Edit]
|
Here is an example of a routine that uses the __arglist calling conventions:[Edit]
C# Example using System; class ArgIteratorDemo { 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 void Main (string[] args) { int result = AddABunchOfInts (__arglist ( 2, 3, 4 )); Console.WriteLine ("Answer: {0}", result); } }
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0