Or without the need for a custom delegate:
void UpdateText(string value)
{
if (InvokeRequired)
Invoke(new MethodInvoker(delegate { UpdateText(value); }));
else
rtbChat.Text = value;
}
[Added] Posted a Tip about this which has attracted some alternative methods and some interesting discussion
here[
^].