FileContentResult(Byte[], String) 构造函数

定义

使用指定的文件内容和内容类型初始化 类的新实例 FileContentResult

public FileContentResult (byte[] fileContents, string contentType);
new System.Web.Mvc.FileContentResult : byte[] * string -> System.Web.Mvc.FileContentResult
Public Sub New (fileContents As Byte(), contentType As String)

参数

fileContents
Byte[]

要发送到响应的字节数组。

contentType
String

要用于响应的内容类型。

例外

fileContents 参数为 null。

适用于