private event handlers are always executed whenever and event they handle is
raised. When inheriting from a class that handle some events, and when these
events fired in the child class, event handlers in the parent will be
executed.
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"al********@gmail.com" wrote:
On Mar 4, 9:41 am, alexia....@gmail.com wrote:
Hi All,
I have window based app which has two classes.
Class A and Clas B
Call B Inherits from Class A.
Class A has events. How do I cause Class B not to use Class A events.
For example:
Class A Form_load is being fired even when Class B form is being
loaded. There are other events in Class A( Datagridview events) are
being fired also.
Can I cause some of the events to be fired and some not to be?
TIA,
Alexia
Ok, I've found solution which I am not sure if it is the right one.
I overrided events that I don't wish to use. But, why do I have to
override them if the events are declared as private?
Why are they being fired?
thanks.