FileExtensionContentTypeProvider.TryGetContentType(String, String) 方法

定义

根据文件路径确定 MIME 类型

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

参数

subpath
String

文件路径

contentType
String

生成的 MIME 类型

返回

如果可以确定 MIME 类型,则为 True

实现

适用于