Click or drag to resize
MimeKit

ContentTypeIsMimeType Method

Check if the this instance of ContentType matches the specified MIME media type and subtype.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public bool IsMimeType(
	string mediaType,
	string mediaSubtype
)

Parameters

mediaType  String
The media type.
mediaSubtype  String
The media subtype.

Return Value

Boolean
true if the ContentType matches the provided media type and subtype.
Exceptions
ExceptionCondition
ArgumentNullException

mediaType is null.

-or-

mediaSubtype is null.

Remarks
If the specified mediaType or mediaSubtype are "*", they match anything.
See Also