随笔分类 -  重构

摘要:1.事件通常写法(C# 1.0)this.button.Click +=new EventHandler(button_Click); void button_Click(object sender, EventArgs e) { throw new NotImplementedException(); } 在C#2.0中使用匿名方法this.button.Click +=delegate{throw new NotImplementedException(); }; //或者 this.button.Click +=delegate(object obj, EventArgs ar... 阅读全文
posted @ 2012-04-25 10:35 Bug山Bug海 阅读(168) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示