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
- attachment
Type: Microsoft.Exchange.Data.Transport.Email.Attachment
The attachment to remove from the collection.
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.