业精于勤

导航

2011年9月15日

C#面向对象基础(八) 代理

摘要: 代理/委托代码下载usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApp{//代理/委托方法的指针C事件的基础方法作为参数//定义一个代理(不同的“代理”,代理不同的方法.)delegatevoidMyDelegate();//类型/代理名称/方法的参数表//MyDelegate是一种类型classMyDelegateclassProgram{staticvoidMain(string[]args){MyDelegated=newMyDelegate(St 阅读全文

posted @ 2011-09-15 15:00 言午 阅读(260) 评论(0) 推荐(0) 编辑