DirectoryAttributeCollection::Insert Method (Int32, DirectoryAttribute^)
The Insert method inserts the specified DirectoryAttribute object into the DirectoryAttributeCollection at the specified index.
Assembly: System.DirectoryServices.Protocols (in System.DirectoryServices.Protocols.dll)
Parameters
- index
-
Type:
System::Int32
The zero-based index point, in the collection, at which to insert the DirectoryAttribute object.
- value
-
Type:
System.DirectoryServices.Protocols::DirectoryAttribute^
The DirectoryAttribute object to be inserted into the collection.
| Exception | Condition |
|---|---|
| ArgumentException | value is a null reference (Nothing in Visual Basic) or value specifies a modification operation other than Add. |
| ArgumentOutOfRangeException | index is less than zero, or index is greater than the number of elements in the DirectoryAttributeCollection object. |
Available since 2.0