TraceListenerCollection.Insert(Int32, TraceListener) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The position in the list to insert the new TraceListener.
- listener
- TraceListener
A TraceListener to insert in the list.
Exceptions
The index
is not a valid index in the list.
listener
is null
.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om