MimeTypeMap.GetExtension Method

Gets the extension from the provided MINE type.
Public Shared Function GetExtension( _ 
ByVal mime_type As String, _ 
Optional ByVal throw_error_if_not_found As Boolean = true _ 
) As String
This language is not supported or no code example is available.
public static string GetExtension( 
string mime_type
bool throw_error_if_not_found = true 
)
This language is not supported or no code example is available.
public:  
static String^ GetExtension( 
String^ mime_type
bool throw_error_if_not_found 
)
This language is not supported or no code example is available.
public static function GetExtension( 
mime_type : String
throw_error_if_not_found : boolean 
) : String;
This language is not supported or no code example is available.

Parameters

mime_type
string

Type of the MIME.

throw_error_if_not_found
bool

if set to true, throws error if extension's not found.

Return Value

string

The extension.

Exception type Condition

ArgumentException

ArgumentException

ArgumentNullException

ArgumentNullException

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1

In this article

Definition