I am getting the following Compiler Warning:
'Resources.Foo.GetType()' hides inherited member 'object.GetType()'. Use the new keyword if hiding was intended. Resources.NET\Resources\Class1.cs 123 20 Resources
for this (very simplified) code:
public interface IFoo
{
int GetType();
string GetDisplayName();
}
public class Foo : IFoo
{
public int GetType() { return 3; } *** Warning: points to here (line 123)***
public string GetDisplayName() { return "Foo"; }
}
Note, what I don't get is why the GetDisplayName() function does NOT get a warning. I am clearly overlooking something.
I have poked around Stack Overflow and googled this error and it seems to apply to class inheritance, not interfaces. I am really confused why this would be triggered for the interface (which defines its methods as virtual).
Thanks in advance for the insight.