C# __arglist 关键字
using System.Runtime.InteropServices; namespace Alpha { class Beta { [DllImport("msvcrt.dll")] static extern int scanf(string format, __arglist); [DllImport("msvcrt.dll")] static extern int printf(string format, __arglist); static void Main() { int a = 0; int b = 0; unsafe { scanf("%d%d", __arglist(&a, &b)); } printf("%d + %d = %d\n", __arglist(a, b, a + b)); } } }
posted on 2018-12-16 14:08 JebediahKerman 阅读(806) 评论(0) 收藏 举报
浙公网安备 33010602011771号