MapiAttachmentCollection.Insert

Insert(int, MapiAttachment)

Inserts an element into the Collection at the specified index.

public void Insert(int index, MapiAttachment item)
ParameterTypeDescription
indexInt32The zero-based index at which item should be inserted.
itemMapiAttachmentThe object to insert. The value can be null for reference types.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionindex is less than zero.

See Also


Insert(int, string, MapiMessage)

Inserts a message as attachment into the MapiAttachmentCollection at the specified index.

public void Insert(int index, string name, MapiMessage msg)
ParameterTypeDescription
indexInt32The zero-based index at which should be inserted.
nameStringThe name of attachment.
msgMapiMessageThe MapiMessage that represents the attached message.

Exceptions

exceptioncondition
ArgumentNullExceptionthrows if message is null.

See Also