|
-
Sealing methods must include the override keyword, why ?
Hi all,
I was wondering why I have to put the override keyword when I want to seal
a method. Sealing a class is pretty easy because you put the sealed keyword
in front of the class. But for functions, the C# compiler tells me that
I have to add the keyword override. Is that normal ?
For example,
public sealed void foo() {}; // Won't compile
public sealed override foo() {} // No problem
Thanks,
Louis-Philippe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks