匿名方法的机种书写形式

this.BeginInvoke(new EventHandler(
(sender,e)=>
{
var x = (dynamic)sender;
var y = (dynamic)e;
}
), new object[] { msg, total, curresult, type });

this.BeginInvoke(new Func<string, string, string>(
(x, y) =>
{
return "";
}
), new object[] { msg, total.ToString() });
this.BeginInvoke(new Action<string, string>(
(x, y) =>
{
}
), new object[] { msg, total.ToString() });

 

this.BeginInvoke(new EventHandler(
delegate
{

}
), new object[] { msg, total, curresult, type });

posted @ 2019-03-05 17:07  jeffery1010  Views(117)  Comments(0Edit  收藏  举报