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 do you mean by sealed classes and static classes?
Why do we use constructors in c#?
What is jagged array in c#?
What is iformatprovider in c#?
Can you mark static constructor with access modifiers?
write a program to find the biggest palindrome in the given string
Why interface is required?
What is the difference between static class and abstract class in c#?
Is functional interface runnable?
Which technology is best for desktop application?
What language is c# similar to?
Why are strings immutable c#?
What is dataset c#?
What's your approach to fetch static data in your windows form application?
What do you mean by generic class in c#?