InternetAddressList   Conversion (InternetAddressList to MailAddressCollection)

Explicit cast to convert a InternetAddressList to a MailAddressCollection.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static explicit operator MailAddressCollection? (
	InternetAddressList? addresses
)

Parameters

addresses  InternetAddressList
The addresses.

Return Value

MailAddressCollection
The equivalent MailAddressCollection.

Remarks

Casts a InternetAddressList to a MailAddressCollection in cases where you might want to make use of the System.Net.Mail APIs.

Exceptions

InvalidCastException addresses contains one or more group addresses and cannot be converted.

See Also