有人可以解释下面的代码:
this.Invoke((MethodInvoker)delegate
{
lblNCK.Text = cncType;
});
Run Code Online (Sandbox Code Playgroud)
这是它来自哪里:
string cncType;
if (objDMainCncData != null)
{
int rc = objDMainCncData.Init(objDGroupManager.Handle);
if (rc == 0)
{
cncType = objDMainCncData.GetCncIdentifier();
if (cncType != string.Empty)
{
if (cncType.ToUpper().IndexOf("+") != -1)
_bFXplus = true;
this.Invoke((MethodInvoker)delegate
{
lblNCK.Text = cncType;
});
}
}
else
{
DisplayMessage("objDMainCncData.Init() failed ! error : " + rc.ToString());
}
}
}
Run Code Online (Sandbox Code Playgroud)
我没有使用"this.Invoke((MethodInvoker)委托").
提前谢谢你.
彼得.