共用方式為


TraceSection.Enabled 屬性

定義

取得或設定一個值,表示 ASP.NET 追蹤服務是否啟用。

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

屬性值

true如果啟用了追蹤;否則,。 false 預設值為 true

屬性

範例

以下程式碼範例說明如何使用該 Enabled 屬性。 此程式碼範例是本類別更大範例 TraceSection 的一部分。


// Get the current Enabled property value.
Boolean enabledValue = traceSection.Enabled;

// Set the Enabled property to false.
traceSection.Enabled = false;

' Get the current Enabled property value.
Dim enabledValue As Boolean = traceSection.Enabled

' Set the Enabled property to false.
traceSection.Enabled = False

適用於

另請參閱