TraceSection.WriteToDiagnosticsTrace Egenskap

Definition

Hämtar eller anger ett värde som anger om meddelandena som skickas via sidspårningen vidarebefordras till en instans av Trace klassen.

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

Egenskapsvärde

trueom spårningsmeddelandena skickas till Trace klassen, annars . false Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur du använder egenskapen WriteToDiagnosticsTrace . Det här kodexemplet är en del av ett större exempel för TraceSection klassen.


// 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

Gäller för