Overriding base class events

G

GMan

Is there a way to override an event that is inherted from a base class so it
won't be seen in the derived class?

Also is there a way to override an override method that is inherted frmo a
base class so it won't be seen in the derived class

I tried shadows but it's not working like I described.
 
H

Herfried K. Wagner [MVP]

* GMan said:
Is there a way to override an event that is inherted from a base class so it
won't be seen in the derived class?

What do you mean by "won't be seen"?

If you want to prevent the event 'Foo' from being raised, override the
'OnFoo' method and do not call the base class' implementation.
Also is there a way to override an override method that is inherted frmo a
base class so it won't be seen in the derived class

For what reason do you want to do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top