Re: Modifier mixture

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



AD <adriaandavel@xxxxxxxxxxx> wrote:
I have a base class that is inherited often, and I am struggeling to
chose the correct access modifiers.

What I am trying to do is to force all inherited classes to have a
function of the same name as one of the functions in base class (like
an abstract function), but I would also like to add a body to the
function in the base class (like a public/private/protected function),
how would I go about it?

You can't.

What exactly are you trying to achieve? One pattern is to have one
concrete method, and an abstract one which is called by the concrete
one.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.