MimePartCollectionItem Property (Int32) |
Gets the MIME part at the specified zero-based index in the collection.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public MimePart this[
int index
] { get; }
Public ReadOnly Default Property Item (
index As Integer
) As MimePart
Get
Parameters
- index
- Type: SystemInt32
The zero-based index of the MIME part in the collection.
Property Value
Type:
MimePart
A
MimePart object having the specified zero-based index in the collection.
Exceptions Examples This sample loads the message from .EML file and displays Content-Type of
all MIME parts.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
MimePartCollection subParts = msg.MimePartTree.GetAllParts();
for (int i = 0; i < subParts.Count; i++)
{
MimePart part = subParts[i];
Console.WriteLine(part.ContentType);
}
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
Dim i As Integer
Dim subParts As MimePartCollection = msg.MimePartTree.GetAllParts()
For i = 0 To subParts.Count - 1
Dim part As MimePart = subParts(i)
Console.WriteLine(part.ContentType)
Next
See Also