How to call an explicitly implemented interface-method on the base class

后端 未结 7 1177
死守一世寂寞
死守一世寂寞 2020-12-05 09:56

I have a situation, where two classes (one deriving from the other) both implement the same interface explicitly:

interface I
{
  int M();
}

class A : I
{
          


        
7条回答
  •  独厮守ぢ
    2020-12-05 10:41

    it is necessary explicitly?... Can you use an abstract class or class instead of interface?

    interface ISample {}
    class A : ISample {}
    class B : A {}
    ...
    base.fun();
    ...
    

    http://msdn.microsoft.com/en-us/library/hfw7t1ce(v=vs.71).aspx

    I have no idea its not possible call base method when it comes from implementation of interface.

提交回复
热议问题