开发者

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

开发者 https://www.devze.com 2023-02-04 02:38 出处:网络
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

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

精彩评论

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

关注公众号