如果您需要使用一對 #ifdef
#endif 含括作業、新增編譯器特定關鍵字或新增 #pragma 指引,則可以為作業設定 SpecificationProlog、SpecificationEpilog、ImplementationProlog 和 ImplementationEpilog 內容。
關於這項作業
例如,若要指定只有在使用 _DEBUG 編譯程式碼時才可使用作業,請執行下列動作:
- 將 SpecificationProlog 設為 #ifdef
_DEBUG <CR>。
- 將 SpecificationEpilog 設為 #endif。
- 將 ImplementationProlog 設為 #ifdef
_DEBUG <CR>。
- 將 ImplementationEpilog 設為 #endif。
相同的內容可供配置、套件、類別及屬性使用。如需這些內容的詳細定義,請參閱「特性」視窗中顯示的內容定義。