AttachmentSize Property
Gets the length of the binary content of the attachment.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public int Size { get; }

Property Value

Type: Int32
The length of the binary content of the message attachment in bytes.
Remarks
This property contains the length of the attachment's content in decoded form (after the mail message has already been parsed and all MIME parts have been decoded from base64, quoted-printable, etc).
Examples
This sample loads the message from .EML file and displays the size of each attachment's data.
// 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");

// For every attachment...
foreach (Attachment attach in msg.Attachments)
{
    // ...show the length of the attachment data in bytes.
    Console.WriteLine("The size is " + attach.Size.ToString());
}
See Also