Click or drag to resize
MimeKit

MimeTypesGetMimeType Method

Get the MIME-type of a file.

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

Parameters

fileName  String
The file name.

Return Value

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