c# - How to make an array of "types.Add()" -
i not sure if title right, want make array of this:
(microsoft.office.interop.excel._worksheet)newworkbook_first.sheets.add();
now thought had happen:
private static microsoft.office.interop.excel.applicationclass appexcel; private static workbook newworkbook_first = null; private static _worksheet newsheets = null; newsheets = new (microsoft.office.interop.excel._worksheet)newworkbook_first.sheets.add()[];
but didn't solve problem. how make array of type?
i think want array of _worksheet
based on cast.
newsheets = new microsoft.office.interop.excel._worksheet[];
note: see code newworkbook_first.sheets.add()
method , can't create instance of method.
Comments
Post a Comment