GemBox.Email
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    MailAddress Class

    Namespace:
    GemBox.Email
    Assembly:
    GemBox.Email.dll

    Represents MIME mail (mailbox) address.

    • C#
    • VB.NET
    public sealed class MailAddress
    Public NotInheritable Class MailAddress
    Inheritance:
    System.Object
    MailAddress

    Constructors

    MailAddress(String)

    Initializes a new instance of the MailAddress class with specified address.

    • C#
    • VB.NET
    public MailAddress(string address)
    Public Sub New(address As String)
    Parameters
    address
    System.String

    The address.

    MailAddress(String, String)

    Initializes a new instance of the MailAddress class with specified address and display name.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    public string Address { get; set; }
    Public Property Address As String
    Property Value
    System.String

    The address.

    Exceptions
    System.ArgumentException

    Address is null or empty.

    DisplayName

    Gets or sets the display name.

    • C#
    • VB.NET
    public string DisplayName { get; set; }
    Public Property DisplayName As String
    Property Value
    System.String

    The display name.

    Host

    Gets the host part of address.

    • C#
    • VB.NET
    public string Host { get; }
    Public ReadOnly Property Host As String
    Property Value
    System.String

    The host part of address.

    User

    Gets the user part of address.

    • C#
    • VB.NET
    public string User { get; }
    Public ReadOnly Property User As String
    Property Value
    System.String

    The user part of address.

    Methods

    Equals(Object)

    Determines whether the specified System.Object, is equal to this instance.

    • C#
    • VB.NET
    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
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    System.Object.GetHashCode()

    ToString()

    Returns a System.String that represents this instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this instance.

    Overrides
    System.Object.ToString()
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.