hi friends
In your code you use
static keyword.
There is some functionality of static keyword as:
1. You can not create the instance of static class .
2. Static methods can not access non static members.
3. you can not access static member of a class using instance of the class.
As in your code you define the method as static so you can not be able to make any instance inside the method.
now in your code :
static void startWatch_EventArrived(object sender, EventArrivedEventArgs e)
{
button1.Text = "";
}
here as the method is static so you can not be able to create any instance of button inside of the method.
now,
private void startWatch_EventArrived(object sender, EventArrivedEventArgs e)
{
button1.Text = "";
}
in this code you use access specifier i.e,"private" and as the method is not static so you can create any instance inside of the method and you are unable to access that method outside of the class.
I think you are able to understand.