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
List some Advantages of switch-case over if else?
What is the use of 0 in c#?
Are objects passed by reference in c#?
What is c sharp used for?
What do you mean by for each loop?
How long can loop recorders stay in?
What is the use of command builder?
What Is The Difference Between The System.array.copyto() And System.array.clone()?
Define multicast delegate? How it be used?
What does question mark mean in c#?
Can you drink alcohol with a loop recorder?
How many dimensions can an array have?
Can the accessibility of a type member be greater than the accessibility of its containing type?
Can interface inherit class in c#?
Explain the process of polymorphism with an example?