MapiAttachmentCollection.Insert

Insert(int, MapiAttachment)

Inserts an attachment at the specified position.

public void Insert(int index, MapiAttachment item)
ParameterTypeDescription
indexInt32The zero-based position to insert at.
itemMapiAttachmentThe attachment to insert.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionindex is less than zero or greater than the number of attachments.

See Also


Insert(int, string, MapiMessage)

Inserts a message as an embedded attachment at the specified position.

public void Insert(int index, string name, MapiMessage msg)
ParameterTypeDescription
indexInt32The zero-based position to insert at.
nameStringThe name of the attachment.
msgMapiMessageThe message to attach.

Exceptions

exceptioncondition
ArgumentNullExceptionmsg is null.

See Also