469,315 Members | 1,578 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

sealed methods, why to include the override modifier


"If an instance method declaration includes the sealed modifier, it
must also include the override modifier." The C# Programming Language,
§ 10.5.5 Sealed Methods

Why is this?

Thanks,
Mulugeta

Mar 28 '07 #1
1 1692
On Mar 28, 7:59 am, "muler" <mulugeta.abe...@gmail.comwrote:
"If an instance method declaration includes the sealed modifier, it
must also include the override modifier." The C# Programming Language,
§ 10.5.5 Sealed Methods

Why is this?
The "sealed" modifier is only used when overriding a virtual method -
if you're not overriding anything, the method is implicitly sealed
unless you use the "virtual" modifier.

Jon

Mar 28 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bharat Karia | last post: by
14 posts views Thread by Zeng | last post: by
4 posts views Thread by Néstor Marcel Sánchez Ahumada | last post: by
3 posts views Thread by avnrao | last post: by
9 posts views Thread by Kylin | last post: by
10 posts views Thread by TJM | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.