有什么在C#类似于Java的@覆盖批注? [英] Is there something in c# similar to java's @override annotation?

查看:85
本文介绍了有什么在C#类似于Java的@覆盖批注?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 @Override Java和已经在相当方便。有什么在C#相似?

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

推荐答案

C#编译器提供了编译时检查方法覆盖,包括检查,如果该方法实际上重写你意。您可以表明一个方法应该使用.NET 覆盖关键字。

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.

这篇关于有什么在C#类似于Java的@覆盖批注?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆