Sdílet prostřednictvím


FileContentResult(Byte[], String) Konstruktor

Definice

Inicializuje novou instanci FileContentResult třídy pomocí zadaného obsahu souboru a typu obsahu.

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)

Parametry

fileContents
Byte[]

Pole bajtů, které se má odeslat do odpovědi.

contentType
String

Typ obsahu, který se má použít pro odpověď.

Výjimky

Parametr fileContents má hodnotu null.

Platí pro