I’m trying to write the status of the program to the user. But my method to do so doesn’t work. statusBox is a textbox windows form.
public static void writetoStatus(string text)
{
TextBox statusBox = new TextBox();
statusBox.Text = text;
}
Help please!
You can’t access instance variables with a static method. I can’t think of a way that
statusBoxwould not be an instance member. Try making your method non-static and it should be fine.