Class MimeTypes
Holds the MIME types
public sealed class MimeTypes
- Inheritance
-
objectMimeTypes
Methods
GetMimeType(string, string)
Gets the MIME type for a file name.
public static string GetMimeType(string fileName, string Default = "application/octet-stream")
Parameters
Returns
GetMimeType<TDictionary>(string, string, TDictionary)
Gets the MIME type for a file name.
public static string GetMimeType<TDictionary>(string fileName, string Default = "application/octet-stream", TDictionary userTypes = null) where TDictionary : class, IReadOnlyDictionary<string, string>
Parameters
fileName
stringName of the file.
Default
stringThe default value to use if not found.
userTypes
TDictionaryUser-defined types.
Returns
Type Parameters
TDictionary