AttachmentCollectionRemoveAt Method
Removes the attachment with the specified index from the collection.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public void RemoveAt(
	int index
)

Parameters

index
Type: SystemInt32
The zero-based index of the attachment to be removed.

Return Value

Type: 
true if the specified attachment was successfully removed from the collection; otherwise, false.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThe specified index does not exist.
Examples
This sample loads the message from .EML file and removes the first attachment from the message.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// The actual code (put it into a method of your class)

// Load the message from file.
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");

// Remove the first attachment from the collection.
msg.Attachments.RemoveAt(0);
See Also