语言

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

返回

一个 CompilerType 表示应用程序中默认语言的编译器设置。 基类基于应用程序配置文件返回默认编译器。

注解

GetDefaultCompilerType使用该方法检查生成提供程序的默认编译器类型。 使用该方法 GetDefaultCompilerTypeForLanguage 检查在生成提供程序中为特定语言名称配置的编译器类型。

基 BuildProvider 类使用 defaultLanguage 应用程序配置文件部分中的属性值 compilation 确定默认编译器类型。 如果节中 compilation 没有默认语言设置,则使用 VBCodeProvider 语言提供程序设置默认编译器类型。

从 BuildProvider 类派生时,可以使用 GetDefaultCompilerType 该属性在实现中设置 CodeCompilerType 属性。

适用于

另请参阅