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。

適用於