Freigeben über


FileContentResult(Byte[], String) Konstruktor

Definition

Initialisiert einen neuen instance der FileContentResult -Klasse unter Verwendung des angegebenen Dateiinhalts und des angegebenen Inhaltstyps.

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)

Parameter

fileContents
Byte[]

Das Bytearray, das an die Antwort gesendet werden soll.

contentType
String

Der Inhaltstyp, der für die Antwort verwendet werden soll.

Ausnahmen

Der fileContents-Parameter ist null.

Gilt für: