110,536
社区成员
发帖
与我相关
我的任务
分享
bool testboolean = true;
Action a = () => { this.textBox1.Text = "3333"; };
Thread thr = new Thread(() =>
{
testboolean = false;
IAsyncResult asynResult = this.BeginInvoke(a);
if (asynResult.IsCompleted)
testboolean = false;
});
thr.IsBackground = true;
thr.Start();
do
{
Thread.Sleep(100);
} while (testboolean);
Action a = () => { this.textBox1.Text = "3333"; };
Thread thr = new Thread(() =>
{
testboolean = false;
this.Invoke(a);
});
thr.IsBackground = true;
thr.Start();