B
BillyM
The sample code that comes with a StoreController class with the following
method definition:
public void ResumeShopping()
{
State.NavigateValue = "resume";
Navigate();
}
As you can see, the above is not a static method. However, it is consumed in
the Cart class as follows:
private void browseCatalogButton_Click(object sender, System.EventArgs e)
{
StoreController.ResumeShopping();
}
QUESTION: Why is this valid if an instance has not been declared?
method definition:
public void ResumeShopping()
{
State.NavigateValue = "resume";
Navigate();
}
As you can see, the above is not a static method. However, it is consumed in
the Cart class as follows:
private void browseCatalogButton_Click(object sender, System.EventArgs e)
{
StoreController.ResumeShopping();
}
QUESTION: Why is this valid if an instance has not been declared?