When I have a static
field in my class:
public static int Counter = 0;
With a static
constructor:
static Class() {
Counter++;
}
When I create an object of this class and check Class.Counter
it shows me 1
which is correct.
But when I create another object of the same class, Class.Counter
remains 1
.
Why is that?