IContentTypeProvider.TryGetContentType Method
Given a file path, determine the MIME type
Namespace: Microsoft.Owin.StaticFiles.ContentTypes
Assembly: Microsoft.Owin.StaticFiles (in Microsoft.Owin.StaticFiles.dll)
'Declaration
Function TryGetContentType ( _
subpath As String, _
<OutAttribute> ByRef contentType As String _
) As Boolean
'Usage
Dim instance As IContentTypeProvider
Dim subpath As String
Dim contentType As String
Dim returnValue As Boolean
returnValue = instance.TryGetContentType(subpath, _
contentType)
bool TryGetContentType(
string subpath,
out string contentType
)
bool TryGetContentType(
String^ subpath,
[OutAttribute] String^% contentType
)
abstract TryGetContentType :
subpath:string *
contentType:string byref -> bool
function TryGetContentType(
subpath : String,
contentType : String
) : boolean
- subpath
Type: System.String
A file path
- contentType
Type: System.String%
The resulting MIME type
Type: System.Boolean
True if MIME type could be determined