to illustrate:
public class Something { private static int number; static Something() { int number = 10; // Syntax to distingish between local variable and static variable ? } }
Is there a syntax inside the static constructor that can be used to distinguish between a local variable named "number" and a static variable with the same name?
Something.number
Obviously not?
Unqualified will get you an internal variable with scope (local variable):
Console.WriteLine(number);
10
You can qualify your use to get a static variable:
Console.WriteLine(Something.number);
0