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: 2.1.4
Syntax
C#
public class InternetAddressList : IList<InternetAddress>, 
	ICollection<InternetAddress>, IEnumerable<InternetAddress>, IEnumerable, 
	IEquatable<InternetAddressList>, IComparable<InternetAddressList>

The InternetAddressList type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCount
Gets the number of addresses in the InternetAddressList.
Public propertyIsReadOnly
Gets a value indicating whether this instance is read only.
Public propertyItem
Gets or sets the InternetAddress at the specified index.
Public propertyMailboxes
Recursively gets all of the mailboxes contained within the InternetAddressList.
Top
Methods
  NameDescription
Public methodAdd
Adds the specified address.
Public methodAddRange
Adds a collection of addresses.
Public methodClear
Clears the address list.
Public methodCompareTo
Compares two internet address lists.
Public methodContains
Checks if the InternetAddressList contains the specified address.
Public methodCopyTo
Copies all of the addresses in the InternetAddressList to the specified array.
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEquals(InternetAddressList)
Determines whether the specified InternetAddressList is equal to the current InternetAddressList.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Gets an enumerator for the list of addresses.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Gets the index of the specified address.
Public methodInsert
Inserts the address at the specified index.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParse(Byte)
Parses the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(String)
Parses the given text into a new InternetAddressList instance.
Public methodStatic memberParse(Byte, Int32)
Parses the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, Byte)
Parses the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, String)
Parses the given text into a new InternetAddressList instance.
Public methodStatic memberParse(Byte, Int32, Int32)
Parses the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, Byte, Int32)
Parses the given input buffer into a new InternetAddressList instance.
Public methodStatic memberParse(ParserOptions, Byte, Int32, Int32)
Parses the given input buffer into a new InternetAddressList instance.
Public methodRemove
Removes the specified address.
Public methodRemoveAt
Removes the address at the specified index.
Public methodToString
Returns a string representation of the email addresses in the InternetAddressList.
(Overrides ObjectToString.)
Public methodToString(Boolean)
Returns a string representation of the email addresses in the InternetAddressList, optionally encoding them for transport.
Public methodToString(FormatOptions, Boolean)
Returns a string representation of the email addresses in the InternetAddressList, optionally encoding them for transport.
Public methodStatic memberTryParse(Byte, InternetAddressList)
Tries to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(String, InternetAddressList)
Tries to parse the given text into a new InternetAddressList instance.
Public methodStatic memberTryParse(Byte, Int32, InternetAddressList)
Tries to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, Byte, InternetAddressList)
Tries to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, String, InternetAddressList)
Tries to parse the given text into a new InternetAddressList instance.
Public methodStatic memberTryParse(Byte, Int32, Int32, InternetAddressList)
Tries to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, Byte, Int32, InternetAddressList)
Tries to parse the given input buffer into a new InternetAddressList instance.
Public methodStatic memberTryParse(ParserOptions, Byte, Int32, Int32, InternetAddressList)
Tries to parse the given input buffer into a new InternetAddressList instance.
Top
Operators
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