C# is quite nit-picking when it comes to variable scoping. How is it possible that it accepts this code:
class Program { int x = 0; void foo() {
This is not ambiguous the local will be the variable that is assumed to reffed to in your function. If you need to get the class variable this.x allows the name resolution.