Inserts the elements of a collection into the
ObjectSet
at the specified index.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Sub InsertRange( _
ByVal index As Integer, _
ByVal collection As IEnumerable(Of T) _
) |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ObjectSet(Of T)
Dim index As Integer
Dim collection As IEnumerable(Of T)
instance.InsertRange(index, collection)
|
| Managed Extensions for C++ | |
|---|
public: void InsertRange(
int index,
IEnumerable<T>* collection
) |
Parameters
- index
- The zero-based index at which the new elements should be inserted.
- collection
- The collection whose elements should be inserted into
the ObjectSet. The collection itself cannot be null, but
it can contain elements that are null, if type T is a reference type.
Exceptions
| Exception | Description |
| ArgumentNullException | Collection is null. |
| ArgumentOutOfRangeException | Index is less than zero or index is greater
then ObjectSet. |
Requirements
Platforms: Windows 2000, Windows XP family, Windows Server 2003 family, Windows Vista family
See Also