Click or drag to resize
MimeKit

InternetAddressList Class

A list of email addresses.
Inheritance Hierarchy
SystemObject
  MimeKitInternetAddressList

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public class InternetAddressList : IList<InternetAddress>, 
	ICollection<InternetAddress>, IEnumerable<InternetAddress>, IEnumerable, 
	IEquatable<InternetAddressList>, IComparable<InternetAddressList>

The InternetAddressList type exposes the following members.

Constructors
 NameDescription
Public methodInternetAddressList Initialize a new instance of the InternetAddressList class.
Public methodInternetAddressList(IEnumerableInternetAddress) Initialize a new instance of the InternetAddressList class.
Top
Properties
 NameDescription
Public propertyCount Get the number of addresses in the InternetAddressList.
Public propertyIsReadOnly Get a value indicating whether the InternetAddressList is read only.
Public propertyItem Get or set the InternetAddress at the specified index.
Public propertyMailboxes Recursively get all of the mailboxes contained within the InternetAddressList.
Top
Methods
 NameDescription
Public methodAdd Add an address to the InternetAddressList.
Public methodAddRange Add a collection of addresses to the InternetAddressList.
Public methodClear Clear the address list.
Public methodCompareTo Compare two internet address lists.
Public methodContains Check if the InternetAddressList contains the specified address.
Public methodCopyTo Copy all of the addresses in the InternetAddressList to the specified array.
Public methodEquals(InternetAddressList) Determine whether the specified InternetAddressList is equal to the current InternetAddressList.
Public methodEquals(Object) Determine whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
Protected methodFinalize
(Inherited from Object)
Public methodGetEnumerator Get an enumerator for the list of addresses.
Public methodGetHashCode Return the hash code for this instance.
(Overrides ObjectGetHashCode)
Public methodGetType
(Inherited from Object)
Public methodIndexOf Get the index of the specified address.
Public methodInsert Insert an address at the specified index.
Protected methodMemberwiseClone
(Inherited from Object)
Public methodStatic memberParse(Byte) Parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(String) Parse the given text into a new InternetAddressList instance.
Public methodStatic memberParse(Byte, Int32) Parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, Byte) Parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, String) Parse the given text into a new InternetAddressList instance.
Public methodStatic memberParse(Byte, Int32, Int32) Parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, Byte, Int32) Parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, Byte, Int32, Int32) Parse the given input buffer into a new InternetAddressList instance.
Public methodRemove Remove the specified address from the InternetAddressList.
Public methodRemoveAt Remove the address at the specified index.
Public methodToString Serialize an InternetAddressList to a string suitable for display.
(Overrides ObjectToString)
Public methodToString(Boolean) Serialize an InternetAddressList to a string, optionally encoding the list of addresses for transport.
Public methodToString(FormatOptions, Boolean) Serialize an InternetAddressList to a string, optionally encoding the list of addresses for transport.
Public methodStatic memberTryParse(Byte, InternetAddressList) Try to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(String, InternetAddressList) Try to parse the given text into a new InternetAddressList instance.
Public methodStatic memberTryParse(Byte, Int32, InternetAddressList) Try to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, Byte, InternetAddressList) Try to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, String, InternetAddressList) Try to parse the given text into a new InternetAddressList instance.
Public methodStatic memberTryParse(Byte, Int32, Int32, InternetAddressList) Try to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, Byte, Int32, InternetAddressList) Try to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, Byte, Int32, Int32, InternetAddressList) Try to parse the given input buffer into a new InternetAddressList instance.
Top
Operators
 NameDescription
Public operatorStatic member(InternetAddressList to MailAddressCollection) Explicit cast to convert a InternetAddressList to a MailAddressCollection.
Public operatorStatic member(MailAddressCollection to InternetAddressList) Explicit cast to convert a MailAddressCollection to a InternetAddressList.
Top
Remarks

An InternetAddressList may contain any number of addresses of any type defined by the original Internet Message specification.

There are effectively two (2) types of addresses: mailboxes and groups.

Mailbox addresses are what are most commonly known as email addresses and are represented by the MailboxAddress class.

Group addresses are themselves lists of addresses and are represented by the GroupAddress class. While rare, it is still important to handle these types of addresses. They typically only contain mailbox addresses, but may also contain other group addresses.

See Also