inherit problem

  • Thread starter Thread starter Cc
  • Start date Start date
C

Cc

hi,
is there a way to raise event on base class?

I make a dll project that create alot of class , due to there event that
all the class are using I decide to make a base class and let my other class
to inherit. by doing this I could save problem in case I need to change the
event property. but when I try to raise event on derived class it give me
error (derived class can't rais base class event) .

any suggestion would be great?

rgds
cc
 
Hello,

Cc said:
is there a way to raise event on base class?

I make a dll project that create alot of class , due to there event that
all the class are using I decide to make a base class and let my other class
to inherit. by doing this I could save problem in case I need to change the
event property. but when I try to raise event on derived class it give me
error (derived class can't rais base class event) .

Define a 'Protected' sub procedure in the base class (named 'On<event
name>') and call it from the derived class:

Raising an Event (.NET Framework Developer's Guide)
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconprovidingeventfunctionality.asp
 
Back
Top