Share via


FileExtensionContentTypeProvider.TryGetContentType Method (String, String)

 

Given a file path, determine the MIME type

Namespace:   Microsoft.Owin.StaticFiles.ContentTypes
Assembly:  Microsoft.Owin.StaticFiles (in Microsoft.Owin.StaticFiles.dll)

Syntax

public bool TryGetContentType(
    string subpath,
    out string contentType
)
public:
virtual bool TryGetContentType(
    String^ subpath,
    [OutAttribute] String^% contentType
) sealed
abstract TryGetContentType : 
        subpath:string *
        contentType:string byref -> bool
override TryGetContentType : 
        subpath:string *
        contentType:string byref -> bool
Public Function TryGetContentType (
    subpath As String,
    <OutAttribute> ByRef contentType As String
) As Boolean

Parameters

Return Value

Type: System.Boolean

True if MIME type could be determined

Implements

IContentTypeProvider.TryGetContentType(String, String)

See Also

FileExtensionContentTypeProvider Class
Microsoft.Owin.StaticFiles.ContentTypes Namespace

Return to top