CompilationSection.DefaultLanguage 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定預設程式語言以用於動態編譯檔案。
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 作為預設程式語言。