您将如何使用 C# 重命名“使用指令”?
因为有时候你从某个地方复制一个类(下面的例子)
//Other Code
Excel.ApplicationClass excel;
Excel.Workbooks workbooks;
Excel.Workbook workbook;
Excel.Worksheet worksheet;
Excel.Sheets worksheets;
//Other Code
而不是将所有内容重命名为
//Other Code
Microsoft.Office.Interop.Excel.ApplicationClass excel;
Microsoft.Office.Interop.Excel.Workbooks workbooks;
Microsoft.Office.Interop.Excel.Workbook workbook;
Microsoft.Office.Interop.Excel.Worksheet worksheet;
Microsoft.Office.Interop.Excel.Sheets worksheets;
//Other Code
所以有类似的东西
Using Microsoft.Office.Interop.Excel.ApplicationClass as 'Excel'