Click or drag to resize
MimeKit

ContentTypeIsMimeType Method

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

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

Parameters

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

Return Value

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

mediaType is .

-or-

mediaSubtype is .

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