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.

KeyedCollection.InsertItem Method

Inserts an element into the KeyedCollection at the specified index.

Name Description
KeyedCollection.InsertItem (Int32, T) Inserts an element into the Collection at the specified index.
KeyedCollection.InsertItem (Int32, TItem) Inserts an element into the KeyedCollection at the specified index.

Supported by the .NET Compact Framework.

This page contains an error. The KeyedCollection.InsertItem(Int32,U) method and the inherited Collection.InsertItem method are not overloads of the same method. In fact, the KeyedCollection.InsertItem(Int32,U) method overrides the Collection.InsertItem method. The two methods have the same signature because the base class of KeyedCollection<TKey, TItem> (KeyedCollection<TKey, TItem> in Visual Basic, generic<TKey, TItem> ref class KeyedCollection in C++) is Collection<TItem>, where the generic type parameter TItem of KeyedCollection is substituted for the generic type parameter T of the Collection generic class. The documentation build tools do not resolve these signatures correctly.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft