Code inspection: Field hides property with default implementation in interface
This inspection reports a field that hides an interface property with a default implementation. That can make the code confusing, because the class member and the interface member have the same name but represent different things.
Example
interface IHasValue
{
int Value => 42;
}
class Sample : IHasValue
{
public int Value;
}
interface IHasValue
{
int Value => 42;
}
class Sample : IHasValue
{
public int currentValue;
}
Quick-fix
There is no dedicated code-changing quick-fix for this inspection. A typical correction is to rename the field or replace it with a property that matches the intended interface contract.
01 April 2026