Click or drag to resize
MimeKit

MimeTypesRegister Method

Register a MIME-type to file extension mapping.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public static void Register(
	string mimeType,
	string extension
)

Parameters

mimeType
Type: SystemString
The MIME-type to register.
extension
Type: SystemString
The file extension to register.
Exceptions
ExceptionCondition
ArgumentNullException

mimeType is null.

-or-

extension is null.

ArgumentException

mimeType is empty.

-or-

extension is empty.

Remarks

Registers a MIME-type to file extension mapping.

If the mapping for the MIME-type and/or file extension already exists, then it is overridden by the new mapping.

See Also