FileExtensionContentTypeProvider.TryGetContentType(String, String) Method

Definition

Given a file path, determine the MIME type

public:
 virtual bool TryGetContentType(System::String ^ subpath, [Runtime::InteropServices::Out] System::String ^ % contentType);
public bool TryGetContentType (string subpath, out string contentType);
abstract member TryGetContentType : string * string -> bool
override this.TryGetContentType : string * string -> bool
Public Function TryGetContentType (subpath As String, ByRef contentType As String) As Boolean

Parameters

subpath
String

A file path

contentType
String

The resulting MIME type

Returns

True if MIME type could be determined

Implements

Applies to