//窗口类中:普通类成员函数privateintrecv1(intnum){//stringstrInfo=Convert.ToString(num);//label1.Text=strInfo;System.Threading.Thread.Sleep(1000);returnnum;}privatevoidbutton1_Click(objectsender,EventArgse){Calculcal=recv1;//定义委托对象IAsyncResultre=cal.BeginInvoke(20,null,null);//执行intrt1=cal.EndInvoke(re);//阻塞等待结果label1.Text=rt1.ToString();}//声明委托publicdelegateintCalcul(intnum);