我的笔记

导航

常用异步处理例子

 

 

delegate void ProcessDelegate();

private void btnStart_Click(object sender, EventArgs e)
        {
            ProcessDelegate pdSteps 
= new ProcessDelegate(Process);
            pdSteps.BeginInvoke(
nullnull);
        }

 
private void Process()
        {
               
//do something...
        }

 

 

 

private void btnStart_Click(object sender, EventArgs e)
        {
            Thread threadInit 
= new Thread(Process);
                    threadInit.Start();
        }

 
private void Process()
        {
               
//do something...
        }

 

 

posted on 2010-08-31 17:47  sheme  阅读(297)  评论(0编辑  收藏  举报