开发者

Is it possible to finalize a virtual method in C#?

By that I mean, it is possible t开发者_如何转开发o mark a virtual method in C# as final so no other types deriving from this type, can override it ever again?


Yes: when overriding a method you can also declare it sealed.


You can use sealed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜