Equivalent of Java 1.6 @Override for interfaces in C#

后端 未结 4 1097
慢半拍i
慢半拍i 2021-02-13 03:19

This question gives the answer that Java\'s @Override has the C# equivalent of the override keyword on methods. However, since Java 1.6 the @Override annotation can

4条回答
  •  没有蜡笔的小新
    2021-02-13 03:43

    Not really, although VB.Net does.

    You could implement the method explicitly and have that call the normal public version:

    public void bar() { ... } 
    void IA.bar() { bar(); }
    

提交回复
热议问题