Inserts an element into the Collection<(Of <(T>)>) at the specified index.
Public Sub Insert ( _ index As Integer, _ item As T _ )
Dim instance As Collection Dim index As Integer Dim item As T instance.Insert(index, item)
public void Insert( int index, T item )
public: virtual void Insert( int index, T item ) sealed
public final function Insert( index : int, item : T )
index is less than zero.
-or-
index is greater than Count.
Collection<(Of <(T>)>) accepts nullNothingnullptra null reference (Nothing in Visual Basic) as a valid value for reference types and allows duplicate elements.
If index is equal to Count, item is added to the end of Collection<(Of <(T>)>).
This method is an O(n) operation, where n is Count.
Derived classes can override InsertItem to change the behavior of this method.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune