Share via


TraceSection.WriteToDiagnosticsTrace プロパティ

定義

ページ トレースを通じて発行されたメッセージが Trace クラスのインスタンスに転送されるかどうかを示す値を取得または設定します。

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

プロパティ値

トレース メッセージが Trace クラスに送信される場合は true。それ以外の場合は false。 既定値は、false です。

属性

次のコード例は、WriteToDiagnosticsTrace プロパティの使用方法を示しています。 このコード例は、TraceSection クラスのために提供されている大規模な例の一部です。


// Get the current WriteToDiagnosticsTrace property value.
Boolean writeToDiagnosticsTraceValue = traceSection.WriteToDiagnosticsTrace;

// Set the WriteToDiagnosticsTrace property to true.
traceSection.WriteToDiagnosticsTrace = true;

' Get the current WriteToDiagnosticsTrace property value.
Dim writeToDiagnosticsTraceValue As Boolean = traceSection.WriteToDiagnosticsTrace

' Set the WriteToDiagnosticsTrace property to true.
traceSection.WriteToDiagnosticsTrace = True

適用対象