Invoke和BeginInvoke

执行顺序不一样

        private static int newTask(int mms)
        {
            //C
            
        }

        private delegate int NewTaskDelegate(int mms);


        static void Main(string[] args)
        {
            //A
            NewTaskDelegate newTst = newTask;
            IAsyncResult asyncResult = newTst.BeginInvoke(2000, null, null);
            //B
          
        }

BeginInvoke:  A-B-C

Invoke:  A-C-B

posted @ 2013-02-10 01:19  louiskoo  阅读(184)  评论(0编辑  收藏  举报