CompilationSection.Debug 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定值,指定是要編譯發行二進位碼檔案還是偵錯二進位碼檔案。
public:
property bool Debug { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("debug", DefaultValue=false)]
public bool Debug { get; set; }
[<System.Configuration.ConfigurationProperty("debug", DefaultValue=false)>]
member this.Debug : bool with get, set
Public Property Debug As Boolean
屬性值
如果要將偵錯二進位檔用於編譯,則為 true
,否則為 false
。 false
指定發行二進位碼檔案將會用於編譯。 預設為 false
。
- 屬性
範例
下列程式碼範例示範如何使用 Debug 屬性。 此程式碼範例是提供給 類別之較大範例的 CompilationSection 一部分。
// Display Debug property.
Console.WriteLine("Debug: {0}",
configSection.Debug);
// Set Debug property.
configSection.Debug = false;
' Display Debug property.
Console.WriteLine("Debug: {0}", _
configSection.Debug)
' Set Debug property.
configSection.Debug = False
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應