TraceSection.Enabled 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,表示 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