Can you allow class to be inherited, but prevent the method
from being over-ridden?

Answers were Sorted based on User's Feedback



Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / guest

make the method as sealed

Is This Answer Correct ?    18 Yes 2 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / sujai cn

By using NEW key word with implementation of method (which
is declared as virtual in base class) in the derived class

Is This Answer Correct ?    3 Yes 0 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / mr.f

This problem is very easy, You just declared the method
without virtual keyword. :d

Is This Answer Correct ?    5 Yes 5 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / nkm

Class can be MustInherit and method can be NotInheritable
(VB.NET Concept)

Is This Answer Correct ?    0 Yes 1 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / avijit

declare the method as protected

Is This Answer Correct ?    5 Yes 11 No

Post New Answer

More C Sharp Interview Questions

what are delegates? How you used then in your project?

10 Answers   Hawk Eye, IndiaTimes, Kanbay,


Can a child class call the constructor of a base class?

0 Answers  


List the different stages of a thread?

0 Answers  


What is xml document how do you open it?

0 Answers  


What does it mean?

0 Answers  






what kind of questions (.net)to expect in a telephonic interview.This is the first time i will be facing a tele interview .Any inputs regarding this??

2 Answers   iNube Software Solutions,


What is the main method?

0 Answers  


i have a string aabccefsdss.how can i get the string abcefsd. or write the fallowing string with only character occurrence of once .

1 Answers  


Is there an equivalent to the instanceof operator in visual j++?

0 Answers  


What is jit? What are the different types of jit?

0 Answers  


Define Virtual folder?

0 Answers   Arigo Infotech,


What is callback function in c#?

0 Answers  


Categories