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

    Show / Hide Table of Contents

    MediaType Struct

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

    Represents formatted MIME media type value.

    • C#
    • VB.NET
    public struct MediaType : IEquatable<MediaType>
    Public Structure MediaType
        Implements IEquatable(Of MediaType)
    Implements
    System.IEquatable<MediaType>

    Constructors

    MediaType(String)

    Initializes a new instance of the MediaType structure with raw value.

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

    The raw value.

    Exceptions
    System.ArgumentException

    Value is null or empty.

    System.ArgumentException

    Input string is in invalid format.

    MediaType(String, String)

    Initializes a new instance of the MediaType structure with specified top level type and subtype.

    • C#
    • VB.NET
    public MediaType(string topLevelType, string subtype)
    Public Sub New(topLevelType As String, subtype As String)
    Parameters
    topLevelType
    System.String

    The top level type.

    subtype
    System.String

    The subtype.

    Properties

    Subtype

    Gets the subtype.

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

    The subtype.

    TopLevelType

    Gets the top level type.

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

    The top level type.

    Methods

    Equals(MediaType)

    Determines whether the other MediaType is equal to this MediaType instance.

    • C#
    • VB.NET
    public bool Equals(MediaType other)
    Public Function Equals(other As MediaType) As Boolean
    Parameters
    other
    MediaType

    The other media type to compare with this media type instance.

    Returns
    System.Boolean

    true if the other MediaType is equal to this MediaType instance; otherwise, false.

    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.ValueType.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.ValueType.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.ValueType.ToString()

    Operators

    Equality(MediaType, MediaType)

    Implements the operator ==.

    • C#
    • VB.NET
    public static bool operator ==(MediaType item1, MediaType item2)
    Public Shared Operator =(item1 As MediaType, item2 As MediaType) As Boolean
    Parameters
    item1
    MediaType

    The item1.

    item2
    MediaType

    The item2.

    Returns
    System.Boolean

    The result of the operator.

    Implicit(MediaType to String)

    Performs an implicit conversion from MediaType to System.String.

    • C#
    • VB.NET
    public static implicit operator string (MediaType value)
    Public Shared Widening Operator CType(value As MediaType) As String
    Parameters
    value
    MediaType

    The value.

    Returns
    System.String

    The result of the conversion.

    Implicit(String to MediaType)

    Performs an implicit conversion from System.String to MediaType.

    • C#
    • VB.NET
    public static implicit operator MediaType(string value)
    Public Shared Widening Operator CType(value As String) As MediaType
    Parameters
    value
    System.String

    The value.

    Returns
    MediaType

    The result of the conversion.

    Inequality(MediaType, MediaType)

    Implements the operator !=.

    • C#
    • VB.NET
    public static bool operator !=(MediaType item1, MediaType item2)
    Public Shared Operator <>(item1 As MediaType, item2 As MediaType) As Boolean
    Parameters
    item1
    MediaType

    The item1.

    item2
    MediaType

    The item2.

    Returns
    System.Boolean

    The result of the operator.

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.