Share via


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)

Syntax

'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

Parameters

Return Value

Type: System.Boolean
True if MIME type could be determined

See Also

Reference

IContentTypeProvider Interface

Microsoft.Owin.StaticFiles.ContentTypes Namespace