예제 #1
0
    private void Test2(bool v1, bool v2)
    {
        if (v1 || v2)
        {
            Debug.Log(v1);
            Debug.Log(v2);
        }
        ConvTest tc = new ConvTest();
        bool     vv = tc.TestConv(1, this);
        bool     vv2;

        vv2 = tc.TestConv(1, 2);
        int  r;
        bool vv3 = tc.TestConv2(1, this, out r);
        bool vv4;

        vv4 = tc.TestConv2(2, this, out r);
        int vv5;

        vv5     = tc.TestConv3(3, this, out r);
        tc.Prop = 123;
        int vvv = tc.Prop;

        Test(tc.TestConv(this, 2));
        Object[] arr = new Object[1] {
            null
        };
        Test(arr[0]);
        Test(this.ObjProp);
        Test(this[0]);
    }
예제 #2
0
    public Object TestConv(int a, int b)
    {
        int[]        arr = new int[1];
        DelegateTest dt  = new DelegateTest();

        this.Prop = dt;
        this[0]   = dt;
        arr[0]    = dt;
        DelegateTest v = this.Prop;
        DelegateTest v2 = this[0];
        DelegateTest v3 = arr[0];
        DelegateTest vv, vv2, vv3;

        vv  = this.Prop;
        vv2 = this[0];
        vv3 = arr[0];
        DelegateTest v4 = arr[0];

        int[] arr2 = null;
        v4 = arr2?[0];
        DelegateTest vv4 = arr2?[0];
        ConvTest     ct  = null;

        dt = ct?.Prop;
        dt = ct?[0];
        DelegateTest v5 = ct?[0];
        DelegateTest vv5;

        vv5 = ct?[0];
        return(null);
    }
예제 #3
0
    public bool Test(bool v)
    {
        Fading = NormalEnumerator;
        StartCoroutine(Fading());
        GameObject obj = null;
        int        v0  = (obj) ? 1 : 0;

        System.Func <bool, bool> f0 = vv => obj;
        System.Func <bool, bool> f  = (vv) => obj;
        TestDelegation           td = (int a, ref int b, out int c) => a + (b = 2) + (c = 1);

        if (obj)
        {
            Test2(true, false);
        }
        do
        {
        } while (obj);
        while (obj)
        {
        }
        for (; obj;)
        {
        }
        ConvTest ct = new ConvTest {
            m_Val = new DelegateTest()
        };

        return(obj);
    }