MailAddress Class
Represents MIME mail (mailbox) address.
- Inheritance:
- System.ObjectMailAddress
Constructors
MailAddress(String)
Initializes a new instance of the MailAddress class with specified address.
Parameters
address
- System.String
The address.
MailAddress(String, String)
Initializes a new instance of the MailAddress class with specified address and display name.
public MailAddress(string address, string displayName)
Public Sub New(address As String, displayName As String)
Parameters
address
- System.String
The address.
displayName
- System.String
The display name.
Properties
Address
Gets or sets the address.
Property Value
- System.String
The address.
Exceptions
- System.ArgumentException
Address is null or empty.
DisplayName
Gets or sets the display name.
Property Value
- System.String
The display name.
Host
Gets the host part of address.
Property Value
- System.String
The host part of address.
User
Gets the user part of address.
Property Value
- System.String
The user part of address.
Methods
Equals(Object)
Determines whether the specified System.Object, is equal to this instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this instance.
Returns
- System.Boolean
true
if the specified System.Object is equal to this instance; otherwise, false
.
Overrides
GetHashCode()
Returns a hash code for this instance.
Returns
- System.Int32
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
ToString()
Returns a System.String that represents this instance.
Returns
- System.String
A System.String that represents this instance.