摘要: using System; using System.Threading; namespace ifan { //自定义委托声明 public delegate void childExitDelegate(object sender, ChildExitEventArgs e); public class TDelegate { //自定义的事件,实际上就是上面那个委托类型的实例 public static event childExitDelegate onChildThreadExit; private static void Main() { //订阅事件,就是说,当onChildThreadExit事件发生时调用onChildExitFunction方法 onChildThreadExit += onChildExitFunction; //产生一个子线程,ParameterizedThreadStart可以带一个object参数,所以2.0之后我都用这个很方便 Thread t = 阅读全文
posted @ 2008-07-24 00:48 ifanxp 阅读(679) 评论(1) 推荐(1) 编辑