Share via


FileContentResult(Byte[], String) Constructor

Definition

Initializes a new instance of the FileContentResult class by using the specified file contents and content type.

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)

Parameters

fileContents
Byte[]

The byte array to send to the response.

contentType
String

The content type to use for the response.

Exceptions

The fileContents parameter is null.

Applies to