本帖最后由 fanlose2 于 2009-07-01 19:59:55 编辑

解决方案 »

  1.   


            void Test() {
                //完成的时候会触发该事件
                TestMethodHandler handler = new TestMethodHandler( this.TestMethod );
                handler.BeginInvoke( new AsyncCallback( CallBack ), this );
            }        //asynccallback
            public void CallBack( object obj ) { 
                //这个就是回调函数,socket的回调函数方式类似
            }        //delegate
            public delegate void TestMethodHandler();        //testmethod
            public void TestMethod() {
                System.Threading.Thread.Sleep( 1000 * 60 * 10 );
            }