【摘要】多线程

private delegate int MyMethod();
private int method()
{
    Thread.Sleep(10000);
    return 100;
}
private void MethodCompleted(IAsyncResult asyncResult)
{
    if (asyncResult == null) return;
    textBox1.Text = (asyncResult.AsyncState as 
    MyMethod).EndInvoke(asyncResult).ToString();
}

private void button1_Click(object sender, EventArgs e)
{

    MyMethod my = method;
    IAsyncResult asyncResult = my.BeginInvoke(MethodCompleted, my);
}

摘录自

原文地址:https://www.cnblogs.com/wonder315/p/4142368.html