protected void setLabelText(string text, Color color) { if (this.InvokeRequired) { setLabelTextDelegate d = new setLabelTextDelegate(setLabelText); this.Invoke(d, new object[]{text, color}); } else { this.lblError.Text = text; this.lblError.ForeColor = color; } }
protected void setLabelText(string text, Color color) { if (this.InvokeRequired) { setLabelTextDelegate d = new setLabelTextDelegate(setLabelText); this.Invoke(d, new object[] { text, color }); } else { this.lblError.Text = text; this.lblError.ForeColor = color; } }