hi every body
i write a code in c sharp in which i have made a base class and make an event there.Then i make a derived class and made an other event in that class.
Now what i wanna do is that i wanna invoke in derived class method the base class event but i am facing an error there i am unable find the solution.canaby body tell me the solution.follow ing is the code.
i write a code in c sharp in which i have made a base class and make an event there.Then i make a derived class and made an other event in that class.
Now what i wanna do is that i wanna invoke in derived class method the base class event but i am facing an error there i am unable find the solution.canaby body tell me the solution.follow ing is the code.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace derivedevents
{
delegate void eventhandler();
class bclass
{
public event eventhandler handler;
public void furqan()
{
Console.WriteLine("furqan");
}
public void furqan1()
{
Console.WriteLine("ahmed");
}
public void fire()
{
handler();
}
}
}
//now the base class
namespace derivedevents
{
delegate void eventhandler1();
class dclass:bclass
{
public event eventhandler1 handler1;
public void ahmed()
{
Console.WriteLine("ahmed");
}
public void ahmed1()
{
Console.WriteLine("ahmed ahmed");
}
public void fire1()
{
handler1();
handler();\\[B] i am actually facing the problem here facing error[/B]
}
}
}
Comment