interface IThing
{
int Property {get;}
void Method();
}
class Thing : IThing
{
int IThing.Property {get; } = 999;
void IThing.Method() {Console.WriteLine($"Property = {Property}");}
}
This gives a compiler error "The name Property does not exist in the current context". Regardless if I refer to Property
or IThing.Property
or this.Property
Why does explicit interface implementation appear to 'shield' interface methods from each other? Is this a language feature or a syntax error on my part (I haven't used explicit interface implementations before and was testing it out to see).