Can you have a static variable in a static method? Would the value of this variable be preserved across all calls to the method?
eg.
public static void MyMethod()
{
static int x = 0;
x++;
}
question from:https://stackoverflow.com/questions/4525654/c-static-variable-in-a-static-method