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
Discussion:
5 comments Page 1 of 1.
Sachin said:
1 decade ago
http://msdn.microsoft.com/en-us/library/88c54tsw(v=vs.71).aspx
Ch L N Raju said:
1 decade ago
The keyword 'sealed' indicates that the class methods can't be inherited by any derived class.
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.
So 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.
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.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers