摘要:
namespace EnumAndStructDemo{//定义枚举 enum orientaton : byte(枚举中值的类型) { north=5, south=4, ease, west }//定义结构 struct route { public orientaton oo; public double d; } class Program { static void Main(strin... 阅读全文
posted @ 2009-11-22 20:18
新小白龙
阅读(240)
评论(1)
推荐(0)
摘要:
1.定义委托2.定义事件3.定义事件要注册的方法4.定义事件的触发条件5.注册事件的方法step 1: class Test {//定义委托和事件 public delegate void aa(); public event aa bb;//事件被触动的方法 public string str(string s) { if (s != "") {//调用事件 bb(); } return ""... 阅读全文
posted @ 2009-11-22 19:48
新小白龙
阅读(165)
评论(0)
推荐(0)
浙公网安备 33010602011771号