CompilationSection.DefaultLanguage 属性

定义

获取或设置在动态编译文件中使用的默认编程语言。

public:
 property System::String ^ DefaultLanguage { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("defaultLanguage", DefaultValue="vb")]
public string DefaultLanguage { get; set; }
[<System.Configuration.ConfigurationProperty("defaultLanguage", DefaultValue="vb")>]
member this.DefaultLanguage : string with get, set
Public Property DefaultLanguage As String

属性值

一个值,该值指定要在动态编译文件中使用的默认编程语言。

属性

示例

下面的代码示例演示如何使用该 DefaultLanguage 属性。 该代码示例是 CompilationSection 类中的一个较大示例的一部分。

// Display DefaultLanguage property.
Console.WriteLine("DefaultLanguage: {0}",
  configSection.DefaultLanguage);

// Set DefaultLanguage property.
configSection.DefaultLanguage = "vb";
' Display DefaultLanguage property.
Console.WriteLine("DefaultLanguage: {0}", _
 configSection.DefaultLanguage)

' Set DefaultLanguage property.
configSection.DefaultLanguage = "vb"

注解

指定要在动态编译文件中使用的默认编程语言(如 C# 或 VB.NET)。 使用节定义 system.codedom 语言名称。 默认编程语言是 vb,它将 VB.NET 指定为默认编程语言。

适用于