MailAddressCollection Class
Represents a collection of MailAddress elements.
public sealed class MailAddressCollection : Collection<MailAddress>, IList<MailAddress>, ICollection<MailAddress>, IList, ICollection, IReadOnlyList<MailAddress>, IReadOnlyCollection<MailAddress>, IEnumerable<MailAddress>, IEnumerable
Public NotInheritable Class MailAddressCollection
Inherits Collection(Of MailAddress)
Implements IList(Of MailAddress), ICollection(Of MailAddress), IList, ICollection, IReadOnlyList(Of MailAddress), IReadOnlyCollection(Of MailAddress), IEnumerable(Of MailAddress), IEnumerable
- Inheritance:
- System.ObjectSystem.Collections.ObjectModel.Collection<MailAddress>MailAddressCollection
Implements
System.Collections.Generic.IList<MailAddress>
System.Collections.Generic.ICollection<MailAddress>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<MailAddress>
System.Collections.Generic.IReadOnlyCollection<MailAddress>
System.Collections.Generic.IEnumerable<MailAddress>
System.Collections.IEnumerable
Methods
Add(MailAddress[])
Adds the specified collection of addresses.
public void Add(params MailAddress[] items)
Public Sub Add(ParamArray items As MailAddress())
Parameters
items
- MailAddress[]
The collection whose elements will be added to the end of this MailAddressCollection.
Add(IEnumerable<MailAddress>)
Adds the specified collection of addresses.
public void Add(IEnumerable<MailAddress> items)
Public Sub Add(items As IEnumerable(Of MailAddress))
Parameters
items
- System.Collections.Generic.IEnumerable<MailAddress>
The collection whose elements will be added to the end of this MailAddressCollection.
Exceptions
- System.ArgumentNullException
items
Contains(String)
Determines whether the collection contains the specified mail address.
Parameters
address
- System.String
The mail address to search for.
Returns
- System.Boolean
True
if collection contains the specified mail address; otherwise, false
.
Exceptions
- System.ArgumentException
Address is null or empty.
ToString()
Returns a System.String that represents this instance.
Returns
- System.String
A System.String that represents this instance.
Overrides
System.Object.ToString()
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable