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
Implements
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
Type
Gets the media type.
public string Type { get; }
Property Value
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
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
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
The new instance of MIME type
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
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
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
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
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
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
See Also
IEquatable<t> </t></mimetype>