HeaderCollectionItem Property (Int32) |
Gets or sets the
Header object in the collection at the specified zero-based index.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public Header this[
int index
] { get; set; }
Public Default Property Item (
index As Integer
) As Header
Get
Set
Parameters
- index
- Type: SystemInt32
The zero-based index of the header in the headers collection.
Property Value
Type:
Header
A
Header object having the specified zero-based index in the collection.
Exceptions Examples This sample loads the message from .EML file and displays all headers of this message.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
for (int i = 0; i < msg.Headers.Count; i++)
{
Console.WriteLine(string.Format("{0}: {1}", msg.Headers[i].Name, msg.Headers[i].Value));
}
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
Dim i As Integer
For i = 0 To msg.Headers.Count - 1
Console.WriteLine(String.Format("{0}: {1}", msg.Headers(i).Name, msg.Headers(i).Value))
Next
See Also