TraceListenerCollection.Contains Method (TraceListener)

 

Checks whether the list contains the specified listener.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

public bool Contains(
	TraceListener listener
)

Parameters

listener
Type: System.Diagnostics.TraceListener

A TraceListener to find in the list.

Return Value

Type: System.Boolean

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.

.NET Framework
Available since 1.1
Return to top
Show: