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
Why do we need ienumerable in c#?
Explain the difference between abstract class and interface.
what is the scope of anonymous type ?
Can extension methods access private members?
Is c# a strongly-typed language?
What is c sharp language?
How many types of delegates are there in c#?
What are anonymous types in c#?
Is unity object oriented?
What is difference between dictionary and list in c#?
What's the difference between the debug class and trace class? Documentation looks the same.
Distinguish between system.string and system.text.stringbuilder classes?
Who is a accessibility modifier “protected internal†available to ?
Name the two classes are required for implementing a windows service?
What is the difference between Decorator and Adapter pattern?