Compartilhar via


TraceSection.WriteToDiagnosticsTrace Propriedade

Definição

Obtém ou define um valor que indica se as mensagens emitidas por meio do rastreamento de página são encaminhadas para uma instância da classe 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 da propriedade

Boolean

true se as mensagens de rastreamento forem enviadas para a Trace classe; caso contrário, false. O padrão é false.

Atributos

Exemplos

O exemplo de código a seguir mostra como usar a WriteToDiagnosticsTrace propriedade. Este exemplo de código faz parte de um exemplo maior fornecido para a TraceSection classe.


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

Aplica-se a