KeyedCollection(Of TKey, TItem).RemoveItem Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Removes the element at the specified index of the KeyedCollection(Of TKey, TItem).
Assembly: mscorlib (in mscorlib.dll)
Parameters
- index
- Type: System.Int32
The index of the element to remove.
The key of the element is also removed from the lookup dictionary.
If the number of elements has exceeded the dictionary creation threshold and the KeyedCollection(Of TKey, TItem) is using a lookup dictionary, it will continue to use a lookup dictionary even though the number of elements is again under the threshold.
This method is an O(n) operation, where n is Count.
Notes for Implementers
Override this method to provide customized behavior for the Remove(T) and RemoveAt(Int32) methods, inherited from the Collection(Of T) generic class, and the Remove(TKey) method.
Call the base class implementation of this method to remove the item from the underlying collection and to update the lookup dictionary.