c# invoke
第一种Invoke:
Action<string> ac = new Action<string>(x => { lable.Text = x; });
ac.Invoke(s);
第二种Invoke:
if (this.InvokeRequired)
{
Action<string> ac = new Action<string>(x => { lable.Text = x; });
ac.Invoke(s);
this.Invoke(ac,x)
}
else
{
lable.Text = s;
}
两个傻傻分不清,求告知