MimeTypeMap
Class MimeTypeMap.Syntax
Inheritance
Methods
GetExtension
Parameters
- mimeType string: Type of the MIME.
- throwErrorIfNotFound bool: if set to
true, throws error if extension’s not found.
Returns
string The extension.Exceptions
[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception):[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception):
GetMimeType
Parameters
- str string: The filename or extension.
Returns
string The MIME type.Exceptions
[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception):
TryGetMimeType
Parameters
Returns
bool The MIME type.Exceptions
[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception):