publicdelegate void stopDelegate();
publicstatic void stopTV() {
Console.WriteLine("关闭电视机");
}
publicstatic void stopLight()
{
Console.WriteLine("关灯");
}
publicstatic void stopFan()
{
Console.WriteLine("关电扇");
}
staticvoid Main(string[] args)
{
stopDelegate stop = stopTV;
stopDelegate stop2 = stopLight;
stopDelegate stop3 = stopFan;
stopDelegate stopHead = stop + stop2 +stop3;
//链表头
stopHead();
}