Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

29 lines
600 B
C#

// Compiler options: -unsafe
using System;
using System.Runtime.InteropServices;
namespace NObjective
{
public class Program
{
static volatile bool ProcessExiting = false;
[DllImport ("libc.dylib")]
public extern static void printf (string format, __arglist);
private static void ArglistMethod (__arglist)
{
var iter = new ArgIterator (__arglist);
for (int n = iter.GetRemainingCount (); n > 0; n--)
Console.WriteLine (TypedReference.ToObject (iter.GetNextArg ()));
}
unsafe public static void Main (string[] args)
{
ArglistMethod (__arglist (1, 2, 3));
}
}
}