且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在抽象类和接口中调用具有相同名称的方法。

更新时间:2023-09-13 14:05:40

只能调用明确实现的成员使用接口的实例。它们不构成Class的API的一部分。



Explicitly implemented members can only be called with an instance of the interface. They do not form part of the Class's API.

MyInterface i = new MyClass();
i.MyFunction();