C# Programming - Polymorphism - Discussion

Discussion Forum : Polymorphism - General Questions (Q.No. 2)
2.
A derived class can stop virtual inheritance by declaring an override as
inherits
extends
inheritable
not inheritable
sealed
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
5 comments Page 1 of 1.

Santosh said:   1 decade ago
Sealed keyword always come before override keyword and because override keyword is implicitly virtual and to make that method should not be overridden by inherited class we use sealed keyword.

So that the class methods can't be inherited by any derived class.

Mahesh S Guttedar said:   10 years ago
A sealed class cannot be inherited. It is an error to use a sealed class as a base class. Use the sealed modifier in a class declaration to prevent inheritance of the class.

Ch L N Raju said:   1 decade ago
The keyword 'sealed' indicates that the class methods can't be inherited by any derived class.

Om Pandey said:   10 years ago
Sealed keyword implicitly behave as static, so it stop the inheritance to next level.

Sachin said:   1 decade ago
http://msdn.microsoft.com/en-us/library/88c54tsw(v=vs.71).aspx

Post your comments here:

Your comments will be displayed after verification.