Tariq,
You can prevent overriding a method easily, just don't declare it as
virtual or abstract. However, you can not prevent someone deriving from
your class from shadowing a method. There is just no way to do it.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Tariq" <ta*******@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Any thoughts on how a method on a base class can be prevented from
being overriden or hidden?
Basically the idea is that no matter what all derived classes should
use the method in my base class. Got to prevent hiding via the new
keyword as well.