is it possible to inherit a class but methods declared in
the class should not be inheritable i possible how?
Answer Posted / aakanchha
Yes..!!
We can define a method as "private" ,so the method will not
be inherited.
and by 'sealed' we can prevent overriding but can not
prevent inheriting .
| Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
Explain about Error handling and how this is done
How do you declare a variable in c#?
What's your approach to fetch static data in your windows form application?
Name any three ways to pass parameters to a method in c#?
What is extension method in c sharp?
How can you sort strings in array that are passed to method as arguments?
What is the difference between overriding and overloading in systemverilog?
What is difference between string and string builder?
Can properties be static in c#?
Is string primitive?
What do you mean by abstract class in c#?
Why we need get set property in c#?
What is getenumerator?
Is a c# interface the same as a c++ abstract class?
What is eager and lazy loading in c#?