Share via


TraceSection.WriteToDiagnosticsTrace Propiedad

Definición

Obtiene o establece un valor que indica si los mensajes emitidos a través del seguimiento de páginas se remiten a una instancia de la clase 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

Valor de propiedad

true si los mensajes de seguimiento se envían a la clase Trace; de lo contrario, false. De manera predeterminada, es false.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo utilizar la propiedad WriteToDiagnosticsTrace. Este ejemplo de código es parte de un ejemplo mayor proporcionado para la clase 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

Se aplica a