IndexOf Method

TraceListenerCollection.IndexOf Method

Gets the index of the specified listener.

[Visual Basic]
Public Function IndexOf( _
   ByVal listener As TraceListener _
) As Integer
public int IndexOf(
 TraceListener listener
public: int IndexOf(
 TraceListener* listener
public function IndexOf(
   listener : TraceListener
) : int;


A TraceListener to find in the list.

Return Value

The index of the listener, if it can be found in the list; otherwise, -1.


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

© 2016 Microsoft