Explicitly implementing an interface with an abstract method

Here is my interface:

public interface MyInterface {
    bool Foo();
}

Here is my abstract class:

public abstract class MyAbstractClass : MyInterface {
    abstract bool MyInterface.Foo();
}

This is the compiler error: "The modifier 'abstract' is not valid for this item.

How should I go on about explicitly implementing an abstract with an abstract method?

14
задан Uwe Keim 28 June 2014 в 13:28
поделиться