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 are get and set in c#?
What is delegates and events?
What do multicast delegates mean?
What are the advantages of clr procedure over t-sql procedure?
In .Net, what is an assembly? Also explain the type of assembly.
What is difference between overloading and short circuiting?
What is difference between web and window application?
What does immutable mean in c#?
What is anonymous methods in c#?
How do generics work in c#?
what is a static constructor?
Expalin the way you implement inheritance by using VB.NET/C#?
What is difference between method overriding and method overloading?
How many digits is a 32 bit number?
What is the namespace for the thread class?