Simple Mail and Post Office Protocol for .Net (SmtPop)

IMimeAttachmentCollection.CopyTo Method 

Copies the entire IMimeAttachmentCollection to a one-dimensional Array of MimeAttachment elements, starting at the specified index of the target array.

void CopyTo(
   MimeAttachment[] array,
   int arrayIndex
);

Parameters

array
The one-dimensional Array that is the destination of the MimeAttachment elements copied from the IMimeAttachmentCollection. The Array must have zero-based indexing.
arrayIndex
The zero-based index in array at which copying begins.

Remarks

Please refer to CopyTo for details.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference.
ArgumentOutOfRangeException arrayIndex is less than zero.
ArgumentException

arrayIndex is equal to or greater than the length of array.

-or-

The number of elements in the source IMimeAttachmentCollection is greater than the available space from arrayIndex to the end of the destination array.

See Also

IMimeAttachmentCollection Interface | SmtPop Namespace