TraceListenerCollection.RemoveAt Method (Int32)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Removes from the collection the TraceListener at the specified index.

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

Public Sub RemoveAt (
	index As Integer


Type: System.Int32

The zero-based index of the TraceListener to remove from the list.

Exception Condition

The index is not a valid index in the list.

The index is zero-based. Therefore, you must subtract one from the numerical position of a particular TraceListener to delete that TraceListener. For example, to remove the third TraceListener, you need to specify myTraceListenerColl.RemoveAt(2).

.NET Framework
Available since 1.1
Return to top