IPEndPointCollection.InsertItem(Int32, IPEndPoint) 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 an IPEndPoint element into the IPEndPointCollection at the specified index.
protected:
override void InsertItem(int index, System::Net::IPEndPoint ^ item);
protected override void InsertItem (int index, System.Net.IPEndPoint item);
override this.InsertItem : int * System.Net.IPEndPoint -> unit
Protected Overrides Sub InsertItem (index As Integer, item As IPEndPoint)
Parameters
- index
- Int32
The zero-based index at which item
should be inserted.
- item
- IPEndPoint
The IPEndPoint object to insert. The value can be null
for reference types.
Exceptions
The index
parameter is less than zero
-or-
the index
parameter is greater than the current count of items in the IPEndPointCollection.
The item
parameter is null
.
Remarks
IPEndPointCollection does not accept null
as a valid value. IPEndPointCollection allows duplicate elements.
If index
is equal to current count of items in the IPEndPointCollection , then the item
is added to the end of IPEndPointCollection.
This method is an O(n
) operation, where n
is Collection<T>.Count.
Applies to
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