Hi Opa,
That code was quite a handful

. I am going thru it...meanwhile, go thru
the following code which demostrates the inherited event I had posted about.
Copy paste and modify class location as required.
/*
*
*/
public delegate void MyHandler();
class Base
{
public event MyHandler BaseEvent;
public virtual void OnRaiseEvent()
{
if( BaseEvent!= null ) BaseEvent();
}
}
class Derv : Base
{
public event MyHandler DervEvent;
public Derv()
{
this.BaseEvent += new MyHandler(this.BaseEventHandler);
this.DervEvent += new MyHandler(this.DervEventHandler);
}
public void RaiseEvents()
{
if( DervEvent!=null ) DervEvent();
//if( BaseEvent!=null ) - This is not legal
// BaseEvent();
OnRaiseEvent(); // So raise base events like this
}
public override void OnRaiseEvent()
{
// You might want to intercept the event by
//overriding the Onxxx method like this
Console.WriteLine("Invoking base event");
base.OnRaiseEvent ();
}
private void BaseEventHandler()
{
Console.WriteLine("Handling BASE event");
}
private void DervEventHandler()
{
Console.WriteLine("Handling DERV event");
}
}
/*
*
*/
static void Main(string[] args)
{
Derv d = new Derv();
d.RaiseEvents();
}
HTH,
Rakesh Rajan
Opa said:
Hi Rekesh,
See the reply I posted to Jon with my sample code.
:
Hi Opa,
Please post the code.
Regards,
Rakesh Rajan
:
Hi Jon,
I wasn't sure if it would get lost in the stack. Yes, I am still having
this problem.
I've tried for hours to figure it out. I'm still no where, can you help.
Thanks
:
I have tried for two days to solve this problem with no luck.
Any reason for posting a new thread rather than continuing in the
previous one?
<snip>
I can post my code if needed.
Yes, please do. I've already asked you to post a short but complete
program which demonstrates the problem...