示例#1
0
    public static int test_3_return_struct()
    {
        Simple v = get_simple(1);

        if (v.a != 1)
        {
            return(0);
        }
        if (v.b != 2)
        {
            return(0);
        }
        if (v.c != 3)
        {
            return(0);
        }
        if (v.d != 4)
        {
            return(0);
        }
        return(3);
    }
示例#2
0
    public static int test_2_return_struct_virtual()
    {
        Tests  t = new Tests();
        Simple v = t.v_get_simple(2);

        if (v.a != 2)
        {
            return(0);
        }
        if (v.b != 3)
        {
            return(0);
        }
        if (v.c != 4)
        {
            return(0);
        }
        if (v.d != 5)
        {
            return(0);
        }
        return(2);
    }
示例#3
0
文件: objects.cs 项目: faksam/mono
 public int SetFields()
 {
     constsimple.a = 0x1337;
     simple1       = simple2 = constsimple;
     return(simple1.a - simple2.a);
 }