if this InvokeRequired false this Text value else SetOperationDelegate

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if (this.InvokeRequired == false)
{
this.Text = value;
}
else
{
SetOperationDelegate del = (SetOperationDelegate)Delegate.CreateDelegate(
typeof(SetOperationDelegate), this, "set_Operation");
this.Invoke(del, new object[] {value});
}