localhost.Service1 aa = new testWinForm.localhost.Service1();
void DoClientUI (IAsyncResult ar)
{
label1.Text = aa.EndGetName (ar);
}
private void button1_Click(object sender, System.EventArgs e)
{
AsyncCallback callback = new AsyncCallback(DoClientUI);
aa.BeginGetName(textBox1.Text,callback,null);
}
void DoClientUI (IAsyncResult ar)
{
label1.Text = aa.EndGetName (ar);
}
private void button1_Click(object sender, System.EventArgs e)
{
AsyncCallback callback = new AsyncCallback(DoClientUI);
aa.BeginGetName(textBox1.Text,callback,null);
}
C# 异步编程示例
1万+

被折叠的 条评论
为什么被折叠?



