Share via


AttachmentCollection.Remove method

The Remove method removes an element from the collection based on the Attachment object specified by the attachment parameter.

Namespace:  Microsoft.Exchange.Data.Transport.Email
Assembly:  Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)

Syntax

'Declaration
Public Function Remove ( _
    attachment As Attachment _
) As Boolean
'Usage
Dim instance As AttachmentCollection
Dim attachment As Attachment
Dim returnValue As Boolean

returnValue = instance.Remove(attachment)
public bool Remove(
    Attachment attachment
)

Parameters

Return value

Type: System.Boolean
The Remove method returns true if the Attachment object specified by the attachment parameter existed in the collection and the method successfully removed the attachment from the collection; otherwise, the method returns false.

See also

Reference

AttachmentCollection class

AttachmentCollection members

Microsoft.Exchange.Data.Transport.Email namespace