???C#?е???к????
???????????? ???????[ 2014/8/19 11:45:23 ] ??????????? ??? C#
???????????????C#?????????????????÷?????????ο?????????????????????ü???????ü????????????????
?????????????????????????????????У???????????????????????????????????ж?????????????è?????????è?У???????????????????
?????????????????????к?????????????
????è??????????????????è?????????????è????????????????????????????????????????????????????????????è??????????????????????????????è????????????
???????????????£?
None.gifusing System;
None.gifusing System.Collections.Generic;
None.gifusing System.Text;
None.gifnamespace TestConsole
ExpandedBlockStart.gif{
InBlock.gif// ?????????У?????????????????è?????
InBlock.gifpublicdelegatevoid CatListeningHandler();
InBlock.gif
InBlock.gifpublicclass Cat
ExpandedSubBlockStart.gif{
InBlock.gif//?????????????????????è????
InBlock.gifpublicevent CatListeningHandler CatCry;
InBlock.gif
InBlock.gifpublicvoid Cry()
ExpandedSubBlockStart.gif{
InBlock.gif Console.WriteLine("Meow~~");
InBlock.gif OnCry();
ExpandedSubBlockEnd.gif }
InBlock.gif
InBlock.gifprotectedvirtualvoid OnCry()
ExpandedSubBlockStart.gif{
InBlock.gifif (CatCry !=null)
ExpandedSubBlockStart.gif{
InBlock.gif CatCry();
ExpandedSubBlockEnd.gif }
ExpandedSubBlockEnd.gif }
ExpandedSubBlockEnd.gif }
InBlock.gif
InBlock.gifpublicclass Mouse
ExpandedSubBlockStart.gif{
InBlock.gifpublicvoid Run()
ExpandedSubBlockStart.gif{
InBlock.gif Console.WriteLine("Mouse run awaydot.gif");
ExpandedSubBlockEnd.gif }
ExpandedSubBlockEnd.gif }
InBlock.gif
InBlock.gifclass Program
ExpandedSubBlockStart.gif{
InBlock.gifstaticvoid Main(string[] args)
ExpandedSubBlockStart.gif{
InBlock.gif Cat cat =new Cat();
InBlock.gif
InBlock.gif Mouse mouse =new Mouse();
InBlock.gif
InBlock.gif// ??è?к????????????????
InBlock.gif cat.CatCry +=new CatListeningHandler(mouse.Run);
InBlock.gif
InBlock.gif cat.Cry();
ExpandedSubBlockEnd.gif }
ExpandedSubBlockEnd.gif }
ExpandedBlockEnd.gif}
None.gif
????С??cat.CatCry +=new CatListeningHandler(mouse.Run)??CatListenningHandler???????У???????????????????????????????????CatCry?????е?????????+=??????????й????????????????????CatCry????????????mouse.Run()????С???????CatCry??????+=??????????????????????????????????з?????????С???????????в????????У?????-=???????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11