MailBee.NET Objects 4.0

MimePart.GetAllParts Method 

Returns the collection containing this MIME part and all its sub-parts (if any) as a flat list.

public MimePartCollection GetAllParts();

Return Value

A reference to the MimePartCollection object containing body structures of the MIME part and all its sub-parts (including sub-sub-parts, etc).

Remarks

The developer can use this method to get flat representation of the MIME parts tree. This is useful when it's required to quickly iterate through all of the MIME parts (for instance, to count all the attachments of the mail message).

To get the collection of immediate sub-parts of the MIME part, use SubParts property.

Note    If a MIME part does not have any sub-parts, this method will return MimePartCollection object containing only this MIME part itself.

Example

The example is available in MimePartCollection topic.

See Also

MimePart Class | MailBee.Mime Namespace | MailMessage | MimePartCollection | SubParts