Is there something in c# similar to java's @override annotation?

前端 未结 4 700
生来不讨喜
生来不讨喜 2021-02-18 23:48

I\'ve used the @Override in java and has come in quite handy. Is there anything similar in c#?

4条回答
  •  庸人自扰
    2021-02-19 00:02

    The C# compiler provides compile-time checking for method overrides, including checking if the method is actually overriding as you intended. You can indicate that a method should be overridden using the .NET override keyword.

提交回复
热议问题