FromExtension

FileType.FromExtension method

Maps file extension to file type.

public static FileType FromExtension(string extension)
Parameter Type Description
extension String File extension (including the period “.”).

Return Value

When file type is supported returns it, otherwise returns default Unknown file type.

Exceptions

exception condition
ArgumentException Thrown when extension is null or empty string.

See Also