Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
if you want a method of a class not to override what will you do?
Posted
Comments
BillWoodruff 11-Oct-14 6:59am    
In what context does this problem arise for you ? Show your code.

1 solution

There is a discussion of the methods here[^]

Basically you need to research virtual[^] methods and sealed[^]
 
Share this answer
 
Comments
raxhemanth 11-Oct-14 7:11am    
this is the question asked me in an interview today
CHill60 11-Oct-14 7:19am    
You might want to try getting hold of a copy of Jon Skeet's book "C# in Depth" or "C# in a Nutshell" from O'Reilly. Even if you just skim read one or both of them you should be able to retain enough information to know what it is you want more detail on ... I have a terrible memory, but because I read articles and books I often go "I'm sure there is a method for this and it's called something like ..."
virtual/sealed/protected however is fairly basic stuff, so I would advise reading up on things like that before your next interview
BillWoodruff 11-Oct-14 7:36am    
+5
CHill60 11-Oct-14 7:48am    
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900