AttachmentCollection

Inheritance: java.lang.Object, com.aspose.ms.System.Collections.ObjectModel.Collection

All Implemented Interfaces: com.aspose.ms.System.IDisposable, java.io.Closeable

public final class AttachmentCollection extends System.Collections.ObjectModel.Collection<Attachment> implements System.IDisposable, Closeable

Represents a collection of e-mail message attachments.

Methods

Method Description
dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
close()
clear() Removes all elements from the Collection.
removeAt(int index) Removes the element at the specified index of the Collection.
insertItem(int index, Attachment item) Inserts an element into the ``` System.Collections.ObjectModel.Collection`1 ``` at the specified index.

dispose()

public final void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

close()

public void close()

clear()

public void clear()

Removes all elements from the Collection.

removeAt(int index)

public void removeAt(int index)

Removes the element at the specified index of the Collection.

Parameters:

Parameter Type Description
index int The zero-based index of the element to remove.

insertItem(int index, Attachment item)

public void insertItem(int index, Attachment item)

Inserts an element into the ``` System.Collections.ObjectModel.Collection`1 ``` at the specified index.

Parameters:

Parameter Type Description
index int The zero-based index at which ``` item ``` should be inserted.
item Attachment The object to insert. The value can be null for reference types.