is it possible to inherit a class but methods declared in
the class should not be inheritable i possible how?
Answer Posted / vishal
That's Correct.
Using private keyword in the method signature is a way of
preventing inheritance of that method in child class.
Please note that using "sealed" keyword in method signature
only prevents overriding of the method in child class, but
the method is still inheritable in the child class.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Define sealed classes in c#?
Why do we need delegates?
Why do we use inheritance in c#?
What is datasource c#?
Is vs as c#?
What Is A Multicast Delegate?
Can you store different types in an array in c#?
How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?
Is null c# operator?
Define the term immutable ?
What are partial types in c#?
What is delegates in c# and uses of delegates?
Name some properties of thread class.
What is a data set in c#?
Explain the difference between const and static read-only?