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

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

Property Value

Type: Int32
The length of the binary content of the message attachment in bytes.
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).
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();

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