Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InsertItem Method

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.

Community Additions

ADD
Show:
© 2015 Microsoft