In the following example, Resharper complains about DoA()
method never being used, despite being implemented by the 'AImplementator' class:
namespace Test
{
public interface A
{
// Method 'DoA' is never used
void DoA();
}
public class AImplementator: A
{
public void DoA()
{
throw new System.NotImplementedException();
}
}
}
I can't understand this behavior, since the interface IS being used.
- Why this happens?
- How can I fix this warning?
Obs: I can supress the warning using comments or the [UsedImplicitly]
attribute. But neither of these options seems to be correct given the situation. I'm using Resharper 9.1.