Earlier my code was running nicely.. then I edited some .. did not touch the designer code.
Why this error is being shown?
Earlier my code was running nicely.. then I edited some .. did not touch the designer code.
Why this error is being shown?
Maybe its the label is Null and that's causing the trouble. I'm not that experienced with C# but it could be the case that Controls doesn't except a Null-Pointer.
Looks like, at this point in code label1 is not yet initialized. Whic event handler are you coding this in ? Make sure controls are initialized before using them. Make sure you are using the controls after InitComplete event.
If this is Windows Forms - did you remove the InitializeComponent() line from the form's constructor?