I get an error message “An object reference is required for the non-static field, method, or property….” for calling Refresh function :
// Status
public static string Status { get { return status; } set { status = value; Refresh(); } } private void Refresh() { lblStatus.Text = Status.ToString(); }
Simply make the Status property non-static. Clearly you do not share this property across all the instances of that class. It looks like you are working with a control or a page class and you trying to call other instance methods or properties also.
So this will fix the compilation error.