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
public bool Contains(
 TraceListener listener
public: bool Contains(
 TraceListener* listener
public function Contains(
   listener : TraceListener
) : Boolean;


A TraceListener to find in the list.

Return Value

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


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


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