共用方式為


BuildProvider.GetDefaultCompilerType 方法

定義

回傳應用程式中預設語言的編譯器設定。

protected:
 System::Web::Compilation::CompilerType ^ GetDefaultCompilerType();
protected System.Web.Compilation.CompilerType GetDefaultCompilerType();
member this.GetDefaultCompilerType : unit -> System.Web.Compilation.CompilerType
Protected Function GetDefaultCompilerType () As CompilerType

傳回

A CompilerType 代表應用程式中預設語言的編譯器設定。 基底類別會回傳基於應用程式設定檔的預設編譯器。

備註

使用該 GetDefaultCompilerType 方法檢查建置提供者的預設編譯器類型。 使用此 GetDefaultCompilerTypeForLanguage 方法檢查建置提供者中特定語言名稱所設定的編譯器類型。

基底 BuildProvider 類別會根據 defaultLanguage 應用程式設定檔區段中的 compilation 屬性值來決定預設編譯器的類型。 若該 compilation 區段中沒有預設語言設定,則會使用 VBCodeProvider 語言提供者設定預設編譯器類型。

BuildProvider 類別推導時,你可以用來 GetDefaultCompilerType 設定 CodeCompilerType 該屬性。

適用於

另請參閱