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

MimeAttachmentList.CopyTo Method (MimeAttachment[], Int32)

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

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

Parameters

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

Implements

IMimeAttachmentCollection.CopyTo

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 MimeAttachmentList is greater than the available space from arrayIndex to the end of the destination array.

See Also

MimeAttachmentList Class | SmtPop Namespace | MimeAttachmentList.CopyTo Overload List