FileExtensionContentTypeProvider.TryGetContentType(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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