文章分类 -  C#基础

委托笔记(2)- 使用委托实现回调
摘要:下面是使用委托实现回调的示例:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Demo_Delegate{ class Program { delegate void callbackDelegate(string Message); static void Main(string[] args) { callbackDelegate result = ResultCallback; ... 阅读全文
posted @ 2012-07-09 12:53 huobaby 阅读(84) 评论(0) 推荐(0)
委托笔记(1)-委托链接(多播委托)
摘要:没有返回结果的委托链接:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Demo_Delegate{ class Program { delegate void MethodsDelegate(); static void Main(string[] args) { // 首先对 methods 委托赋值,使其指向 Method1() ; // 接下来使用 += ... 阅读全文
posted @ 2012-07-09 12:23 huobaby 阅读(119) 评论(0) 推荐(0)