C# Control.BeginInvoke

private void ResheshState(string msg)
{
if (lblState.InvokeRequired == true)
{
lblState.BeginInvoke((MethodInvoker)delegate
{
lblState.Text = msg;
});
}
else
lblState.Text = msg;
}

原文地址:https://www.cnblogs.com/rogerroddick/p/2965188.html