PowerTCP Mail for .NET
Insert Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > MailboxCollection Class : Insert Method




index
The zero-based index at which value should be inserted.
value
The Object to insert.
Inserts an element into the collection at the specified index.

Syntax

Visual Basic (Declaration) 
Public Overrides Sub Insert( _
   ByVal index As Integer, _
   ByVal value As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As MailboxCollection
Dim index As Integer
Dim value As Object
 
instance.Insert(index, value)
C# 
public override void Insert( 
   int index,
   object value
)
Managed Extensions for C++ 
public: void Insert( 
   int index,
   Object* value
) override 
C++/CLI 
public:
void Insert( 
   int index,
   Object^ value
) override 

Parameters

index
The zero-based index at which value should be inserted.
value
The Object to insert.

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeException index is less than zero. -or-index is greater than Count.
System.NotSupportedException The ArrayList is read-only. -or-The ArrayList has a fixed size.

Remarks

If Count already equals Capacity, the capacity of the list is doubled by automatically reallocating the internal array before the new element is inserted.

If index is equal to Count, value is added to the end of ArrayList.

In collections of contiguous elements, such as lists, the elements that follow the insertion point move down to accommodate the new element. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hashtable.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.