Question:Which of the following is the correct code to close all references to the com objects below?
Workbooks books = excel.WorkBooks; Workbook book = books[1]; Sheets sheets = book.WorkSheets; Worksheet ws = sheets[1];
A Marshal.ReleaseComObject(books);
B Marshal.FinalReleaseComObject(books);
C Marshal.ReleaseComObject(sheets); Marshal.ReleaseComObject(books);
D Marshal.ReleaseComObject(sheet); Marshal.ReleaseComObject(sheets); Marshal.ReleaseComObject(book); Marshal.ReleaseComObject(books);
+ AnswerC
+ Report