RemoveAt Method

TraceListenerCollection.RemoveAt Method (Int32)

 

Removes from the collection the TraceListener at the specified index.

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

public void RemoveAt(
	int index
)

Parameters

index
Type: System.Int32

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

Exception Condition
ArgumentOutOfRangeException

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).

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft