CompilationSection.Debug 屬性

定義

取得或設定值,指定是要編譯發行二進位碼檔案還是偵錯二進位碼檔案。

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,否則為 falsefalse 指定發行二進位碼檔案將會用於編譯。 預設為 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

適用於