This documentation is archived and is not being maintained.

TraceListenerCollection.Contains Method

Checks whether the list contains the specified listener.

[Visual Basic]
Public Function Contains( _
   ByVal listener As TraceListener _
) As Boolean
[C#]
public bool Contains(
 TraceListener listener
);
[C++]
public: bool Contains(
 TraceListener* listener
);
[JScript]
public function Contains(
   listener : TraceListener
) : Boolean;

Parameters

listener
A TraceListener to find in the list.

Return Value

true if the listener is in the list; otherwise, false.

Remarks

The Contains method can confirm the existence of a TraceListener before you perform further operations.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

TraceListenerCollection Class | TraceListenerCollection Members | System.Diagnostics Namespace | TraceListenerCollection | TraceListener | DefaultTraceListener | TextWriterTraceListener | Debug | Trace

Show: