Class MimeType

Class MimeType

Namespace: Aspose.Html
Assembly: Aspose.HTML.dll (25.2.0)

Represents an Internet Media Types

[ComVisible(true)]
public class MimeType : IEquatable<mimetype>

Inheritance

objectMimeType

Implements

IEquatable<mimetype>

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

MimeType(string)

Initializes a new instance of MIME type based on serialized string value.

public MimeType(string value)

Parameters

value string

The value.

Properties

SubType

Gets the sub media type.

public string SubType { get; }

Property Value

string

Type

Gets the media type.

public string Type { get; }

Property Value

string

Methods

Equals(MimeType)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(MimeType other)

Parameters

other MimeType

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified System.Object is equal to the current System.Object.

public override bool Equals(object obj)

Parameters

obj object

The System.Object to compare with the current System.Object.

Returns

bool

true if the specified System.Object is equal to the current System.Object; otherwise, false.

FromFileExtension(string)

Creates a new MIME type based on file extension.

public static MimeType FromFileExtension(string fileName)

Parameters

fileName string

The name of the file.

Returns

MimeType

The new instance of MIME type

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

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

ToString()

Returns a System.String that represents Mime type.

public override string ToString()

Returns

string

A System.String that represents this instance.

Operators

operator ==(MimeType, MimeType)

Compares two Mime type and returns a boolean indicating if the two do match.

public static bool operator ==(MimeType a, MimeType b)

Parameters

a MimeType

The first Mime to compare.

b MimeType

The second Mime to compare.

Returns

bool

True if both priorities are equal, otherwise false.

implicit operator MimeType(string)

Performs an implicit conversion from System.String to Aspose.Html.MimeType.

public static implicit operator MimeType(string @string)

Parameters

string string

The string.

Returns

MimeType

The result of the conversion.

implicit operator string(MimeType)

Performs an implicit conversion from Aspose.Html.MimeType to System.String.

public static implicit operator string(MimeType type)

Parameters

type MimeType

The mime type.

Returns

string

The result of the conversion.

operator !=(MimeType, MimeType)

Compares two Mime type and returns a boolean indicating if the two do match.

public static bool operator !=(MimeType a, MimeType b)

Parameters

a MimeType

The first Mime to compare.

b MimeType

The second Mime to compare.

Returns

bool

True if both priorities are not equal, otherwise false.

See Also

IEquatable<t> </t></mimetype>