2013年11月10日
摘要: 说白了就是在一个窗体操作另外一个窗体的东西。 原理是把form2的数据提取出来,利用中间的静态类middle来传递数据,触发事件,调用委托,来修正form1 效果如下: Form1.cs using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;u... 阅读全文
posted @ 2013-11-10 13:27 神秘藏宝室 阅读(386) 评论(0) 推荐(1) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace MyDelegate{ delegate void Del(string str); class Program { static void Main(string[] args... 阅读全文
posted @ 2013-11-10 12:43 神秘藏宝室 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 控制台应用程序代码using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace MyDelegate{ delegate void Del(string msg); class Program { static void Main(string[] args) { Del handler = ReturnMsg; string info = "名叫小白,年方二八,除了没钱和长的太帅外基... 阅读全文
posted @ 2013-11-10 12:35 神秘藏宝室 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 控制台应用程序效果:代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace MyEventTest{ class Program { /// /// 第一步 新建委托需要的带参数的类,属于事件的参数的子类 /// public class MyClassEventArgs : EventArgs { private string name; ... 阅读全文
posted @ 2013-11-10 11:37 神秘藏宝室 阅读(593) 评论(0) 推荐(0) 编辑

 >>>转载请注明出处<<<