I have an interface as shown below:
public interface IInterface { void Open(); void Open(bool flag); void Open(bool flag, bool otherFlag); }
Now, when implementing the interface, I have the following:
public class IClass : IInterface { void IInterface.Open() { Open(false, false); } void IInterface.Open(bool flag) { Open(flag, false); } void IInterface.Open(bool flag, bool otherFlag) {
Now the problem that I am facing is that in the first two function bodies in IClass I cannot call the third function. I get an error message:
The name "Open" does not exist in the current context.
Ok, so I implement the interface explicitly (due to the requirement of another team in the organization), and then I get the "Open" problem. I can remove the explicit IInterface from the three public methods, and then I can successfully compile, even with other methods (not listed here) implemented explicitly, but I'm not sure what the consequences of this are.
Is there a way to call the third method when explicitly implementing interface methods?
Thanks!
source share