예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #3
0
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine("老猫{0}来了, {1}快跑! ", args.StrName,_strName);
 }
예제 #4
0
 public void Run(object sender, CatShoutEventArgs args)
 {
     Console.WriteLine("老猫{0}来了, {1}快跑! ", args.StrName, _strName);
 }