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 a naming conflict: in C#, local variables take precedence over instance variables with the same name, because their scope is narrower.
When the compiler matches a name reference to a name declaration, it uses the matching declaration with the narrowest scope
See documentation on Reference Matching for detailed information on the subject.