??????????????У????????????Щ????
????1.??????????????????????????????Σ?????????????
????2.????????????????????????????????????д??????????(????????“??仰????”)??
??????????????????д??????????????????????Щ???????????У???Щ????????????????????????????±??????????????????????
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
private void btnRefresh_Click(object sender?? EventArgs e)
{
BindData();
}
???????”Refresh”?????????μ??????BindData()?????????????????????ò?д????·??????????C# 2.0???????????????????
????this.btnRefresh.Click += delegate(object sender?? EventArgs e) { BindData(); };
?????????????????????????д?????????????
??????????????????????????????????????????飺????????????????μ????????????????????????????
privatevoid<Test>b__0(object sender?? EventArgs e)
{
this.BindData();
}
?????????????????????????????????
????<Test>b_0??Test??????????????????????(????????????????????????Test???????)
??????????????????????????????????????????????????????????????????????????????????????????????????????.
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????.??.net 2.0??System.Collections.Generic?????????List<T>?????Щ???????????????Find??????????????????????ε??????
????books.Find(delegate(Book book){return book.Price < 50;});
?????????????????????????????????????Lambda??????д????
????books.Find(book=>book.Price<50);???Lambda??????????????????????????????飬?????????С??50????true??
??????????????????Lambda???????
???????????Lambda??????????????????????????????????????????????????Lambda??????????????delegate??????????????????Lambda???????????????????????????????????????????Lambda??????????”Goes to”?????????????????????????(???????????????????????????????????????????????)?????????????????????????Щ?????Lambda??????
//x????????????????????????????????????????????????????
x => x+1
deleage(int x){return x+1;}
//??????????????
x=>{return x+1;}
delegate(int x){return x+1;}
//??????????????????????????????С?????
(int x) => x+1
delegate(int x){return x+1;}
//?????????????????????????????С????
(x??y) => x+y
delegate(int x??int y){return x+y;}
//??ε????
() => 1
delegate(){return 1;}
????????Lambda????????????÷?????????????Lambda??????к?????o?????????Lambda???????????????????????????????Linq?????????????????????????????????????????????????????????????????????????????????????????????????????????????
????Lambda???????????
????Lambda?????????????????????????????????-?????????????????????????????????????λ?????????????????????????????????????????????λ???????????????????????????Lisp?????????????????????????????????????????????????????????????????б???????????????????????????????????????????????У??????????粢??е??????????????????????????“????”??????????????????????????????????????????????????????Щ????????????????????(??????????????鷳)??C#?????????????????????????????????????????????е??2.0??????????????????????????????????????????????3.0???Lambda???????????????Lambda?????delegate?????delegate???????????????????????Lambda????????????????????????????????????????????????????