예제 #1
0
        public void Shout()
        {
            Console.WriteLine("喵,我是{0}.", name);

            if (CatShout != null)
            {
                CatShoutEventArgs e = new CatShoutEventArgs();
                e.Name = this.name;
                CatShout(this, e);
            }
        }
예제 #2
0
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine("老猫{0}来了,{1}快跑", args.Name, name);
 }