class Program
{
public delegate void mydel();
public static event mydel myevent;
static void del()
{
Console.WriteLine("Called in del");
}
static void Main(string[] args)
{
myevent = del;
myevent += new EventHandler(del);
myevent();
Console.ReadLine();
}
}
myevent += new Eventhandler(del);
此行不起作用...它会生成错误“'del' 没有重载匹配委托'System.EventHandler'”