Пример #1
0
    // Use this for initialization
    void Start()
    {
        mTestPriviteData = 100;

        mDelegate1 = (TestDelegate)DelegateFun;
        mDelegate2 = Delegate.CreateDelegate(typeof(TestDelegate), this, "DelegateFun");
        mDelegate3 = DelegateFun;

        mDelegate4 = TDelegateFun;

        //static
        mDelegate5 = new TestDelegate(StaticDelegateFun);
        mDelegate6 = SortByXXX;
        mDelegate7 = TSortByXXX <int>;

        mTestList.Add(1);
        mTestList.Add(2);
        mTestList.Add(3);
    }
Пример #2
0
 private void TestTFun <T, U, V>(TestTDelegate <T, U, V> de, T arg0, U arg1, V arg2)
 {
     de(arg0, arg1, arg2);
 }