コード例 #1
0
ファイル: Program.cs プロジェクト: zhaohengyi/dotNet_PInvoke
        private static void TestUnion2()
        {
            SimpleUnion2_1 u1Integer = new SimpleUnion2_1();
            u1Integer.i = 10;
            TestUnion2(u1Integer, 1);

            SimpleUnion2_2 u1String = new SimpleUnion2_2();
            u1String.str = "*** This is a string. ***";
            TestUnion2(u1String, 2);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: zhaohengyi/dotNet_PInvoke
 private static extern void TestUnion2(SimpleUnion2_2 u, int type);