摘要: .net中的委托,我个人认为很类似于C++ 中的函数指针。你定义一个代理,然后注册函数到这个代理中即可使用。通过下面的例子来讲解.net中委托的使用using System;using System.IO;using System.Windows.Forms;class Set{private Object[] items;//构造器。给对象数组进行初始化public Set(Int32 numItems){items = new Object[numItems];for(Int32 i = 0; i < numItems; i++){items[i] = i;}}//定义一个FeedB 阅读全文
posted @ 2011-06-03 16:57 clown 阅读(735) 评论(0) 推荐(0) 编辑