MimePartSubParts Property
Gets the collection of all immediate sub-parts of the MIME part.

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

Property Value

Type: MimePartCollection
A reference to the collection of all immediate sub-parts of the MIME part, or a null reference (Nothing in Visual Basic) if this MIME part is not multi-part.
Remarks
This property contains the collection of immediate sub-parts of the MIME part. To get the MIME part and all its sub-parts (including sub-sub-parts) as a flat list, use GetAllParts method.
Examples
This sample loads the message from .EML file and displays the content type of each MIME part of 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).
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
if (msg.MimePartTree.SubParts != null)
{
    foreach (MimePart part in msg.MimePartTree.SubParts)
    {
        Console.WriteLine(part.ContentType.ToString());
    }
}
See Also