The problem is that you are using a little-known language feature: reimplementing the interface:
public class Debug : ExternalClass, IDebug { public string GetImportantInfo() { return nameof(Debug); } }
Why are you updating Debug implement IDebug if ExternalClass already does? You reimplement the interface, and since you are doing such a thing, you are not getting warnings; the compiler assumes that you know what you are doing.
If you need behavior that you think is desirable, just donβt repeat the interface implementation:
public class Debug : ExternalClass { public string GetImportantInfo() { return nameof(Debug); } }
If the base class implements it implicitly, I get a compilation warning saying that I am using a new keyword.
This warning has nothing to do with the implementation of the interface. The warning is simply due to a method hiding, you have two methods with the same signature; IDebug is not a factor here, you can deduce it from the equation, and you will still get the same warning.
In my case, a colleague, he said that he needed to implement both a base class and an interface, because it was an event-based interface.
Ok, then tell your colleague to find out what he wants. If you redefine the interface, then any DoSomething call, whether using a typed Debug link or IDebug with a link type, should cause overridden behavior. Any other behavior would be unexpected and deeply perplexing.
On the other hand, if you need to preserve the behavior of the orignal base class, if you call DoSomething() via an IDebug typed link, then do not reimplement the interface. What other alternative do you offer?
Does this mean that you should know which interfaces the base class implements? Yes of course. I find your question about why anyone should know which interfaces of any given class you intend to inherit from tools that are deeply concerned, to be honest.