Click or drag to resize
MimeKit

MimeTypesGetMimeType Method

Get the MIME-type of a file.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public static string GetMimeType(
	string fileName
)

Parameters

fileName
Type: SystemString
The file name.

Return Value

Type: String
The MIME-type.
Exceptions
ExceptionCondition
ArgumentNullExceptionfileName is null.
Remarks
Gets the MIME-type of a file based on the file extension.
See Also