Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TraceListenerCollection::RemoveAt Method (Int32)

 

Removes from the collection the TraceListener at the specified index.

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

public:
virtual void RemoveAt(
	int index
) sealed

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft