WorkbookBeforeClose event of Excell Application has 2 parameters: (Workbook Wb, ref bool Cancel) . I want to add Excel.Application excellApp
like third paramater into that event. Here is the way to pass another parameter to event. I tried:
excelApp.WorkbookBeforeClose += new AppEvents_WorkbookBeforeCloseEventHandler((wb, c) => mamed(wb, c, excelApp ));
But I get error like parameter 2 must be declared with the 'ref' keyword. I also added 'ref'
keyword, but there is not any result.
How can I sole this issue?