TraceListenerCollection.Insert(Int32, TraceListener) TraceListenerCollection.Insert(Int32, TraceListener) TraceListenerCollection.Insert(Int32, TraceListener) TraceListenerCollection.Insert(Int32, TraceListener) Method

Definition

Inserts the listener at the specified index.

public:
 void Insert(int index, System::Diagnostics::TraceListener ^ listener);
public void Insert (int index, System.Diagnostics.TraceListener listener);
member this.Insert : int * System.Diagnostics.TraceListener -> unit
Public Sub Insert (index As Integer, listener As TraceListener)

Parameters

index
Int32 Int32 Int32 Int32

The position in the list to insert the new TraceListener.

Exceptions

Remarks

If the index equals the number of items in the list, then the listener is appended to the end of the list.

The index is zero-based. Therefore, if you want to insert the listener into the third position, you must call myTraceListenerColl.Insert(2, myNewListener).

Applies to

See also