【发布时间】:2014-04-07 02:59:03
【问题描述】:
Excell应用程序的
WorkbookBeforeClose事件有2个参数:(Workbook Wb, ref bool Cancel)。我想将Excel.Application excellApp 之类的第三个参数添加到该事件中。 Here 是将另一个参数传递给事件的方式。我试过了:
excelApp.WorkbookBeforeClose += new AppEvents_WorkbookBeforeCloseEventHandler((wb, c) => mamed(wb, c, excelApp ));
但我得到错误,例如 参数 2 必须使用 'ref' 关键字声明。我也是added 'ref'关键字,但是没有任何结果。
我该如何解决这个问题?
【问题讨论】:
标签: c# excel office-interop excel-interop