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
What is meant by collections in c#?
how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge
What is a constructor in c#?
What is args c#?
What is a streamwriter in c#?
What does console readline do?
Can you mark static constructor with access modifiers?
What is the difference between a field and a property in c#?
Compare and contrast between the System.Array.CopyTo() and Clone()?
What exception can an overridden method throw in comparison with the method it is overriding?
What is new method in c#?
Can scriptable objects have methods?
How much time will it take to learn unity?
What is virtual in c#?
What are the properties of a string class?