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


Please Help Members By Posting Answers For Below Questions

What is task parallel library?

510


Can we have multiple threads in one app domain?

521


What does type safety mean?

577


What is serialization of data?

507


What is the meaning of 0 in c#?

530






Enlist all the components of an ado.net framework?

478


What are extender provider components?

475


What are Regex / regular expressions ?

592


Does c# have primitives?

476


Is there regular expression (regex) support available to c# developers?

524


What is difference between yielding and sleeping?

452


Is visual c# free?

507


What are the advantages of clr procedure over t-sql procedure?

593


Can an int be negative c#?

584


What is namespace explain with example?

454