主类调用代码:

class Program
{
static void Main(string[] args)
{
Cat c1 = new Cat();
c1.Name = "tom";
Mouse m1 = new Mouse(c1);
m1.Name = "Jearry";
Mouse m2 = new Mouse(c1);
m2.Name = "Jearry's son";
c1.Scream += m2.RunAway;
c1.ScreamOut("stop");
Console.Read();
}
}

  执行结果: