无法将 匿名方法 转换为类型“System.Delegate”,因为它不是委托类型 20
this.DocumentChanged=(EventHandler<DataEventArgs<string>>)Delegate.Combine(this.Docum...
this.DocumentChanged = (EventHandler<DataEventArgs<string>>)Delegate.Combine(this.DocumentChanged,
delegate(object sender, DataEventArgs<string> arg)//这句编译器报错
{
if (!string.IsNullOrEmpty(arg.Data))
{
foreach (ToolStripItem item in this.toolStrip.Items)
{
ToolStripButton btn = item as ToolStripButton;
if (null != btn)
{
this.SetBtnCheckedStatus(btn, arg.Data);
}
}
}
}); 展开
delegate(object sender, DataEventArgs<string> arg)//这句编译器报错
{
if (!string.IsNullOrEmpty(arg.Data))
{
foreach (ToolStripItem item in this.toolStrip.Items)
{
ToolStripButton btn = item as ToolStripButton;
if (null != btn)
{
this.SetBtnCheckedStatus(btn, arg.Data);
}
}
}
}); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询