Exemplo n.º 1
0
        // public Action _eventCatShout;
        public void Shout()
        {
            Console.WriteLine("Miao,I am {0}.",_strName);

            if (_eventCatShout != null)
            {
                CatShoutEventArgs e = new CatShoutEventArgs {StrName = this._strName};
                _eventCatShout(this,e);
            }
        }
Exemplo n.º 2
0
        // public Action _eventCatShout;

        public void Shout()
        {
            Console.WriteLine("Miao,I am {0}.", _strName);

            if (_eventCatShout != null)
            {
                CatShoutEventArgs e = new CatShoutEventArgs {
                    StrName = this._strName
                };
                _eventCatShout(this, e);
            }
        }
Exemplo n.º 3
0
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine("老猫{0}来了, {1}快跑! ", args.StrName,_strName);
 }
Exemplo n.º 4
0
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine("老猫{0}来了, {1}快跑! ", args.StrName, _strName);
 }