Hi, I'm learning C# and trying to use a delegate to update a status label from a background worker. That's how I did it in VB. I keep getting an object reference error though with the code toolStripStatusLabelMessage.Text = message;. Here's my code:
public delegate void UpdatetoolStripStatusLabelMessageDelegate(string message);
public static void UpdatetoolStripStatusLabelMessage(string message)
{
toolStripStatusLabelMessage.Text = message;
}
public delegate void UpdatetoolStripStatusLabelMessageDelegate(string message);
public static void UpdatetoolStripStatusLabelMessage(string message)
{
toolStripStatusLabelMessage.Text = message;
}
Last edited: