다음을 통해 공유


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

속성 값

추적 메시지가 클래스로 전송되면 이고, 그렇지 않으면 . 기본값은 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

적용 대상