Share via


VirtualFileResult Constructors

Definition

Overloads

VirtualFileResult(String, MediaTypeHeaderValue)

Creates a new VirtualFileResult instance with the provided fileName and the provided contentType.

VirtualFileResult(String, String)

Creates a new VirtualFileResult instance with the provided fileName and the provided contentType.

VirtualFileResult(String, MediaTypeHeaderValue)

Source:
VirtualFileResult.cs
Source:
VirtualFileResult.cs
Source:
VirtualFileResult.cs

Creates a new VirtualFileResult instance with the provided fileName and the provided contentType.

public:
 VirtualFileResult(System::String ^ fileName, Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ contentType);
public VirtualFileResult (string fileName, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType);
new Microsoft.AspNetCore.Mvc.VirtualFileResult : string * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> Microsoft.AspNetCore.Mvc.VirtualFileResult
Public Sub New (fileName As String, contentType As MediaTypeHeaderValue)

Parameters

fileName
String

The path to the file. The path must be relative/virtual.

contentType
MediaTypeHeaderValue

The Content-Type header of the response.

Applies to

VirtualFileResult(String, String)

Source:
VirtualFileResult.cs
Source:
VirtualFileResult.cs
Source:
VirtualFileResult.cs

Creates a new VirtualFileResult instance with the provided fileName and the provided contentType.

public:
 VirtualFileResult(System::String ^ fileName, System::String ^ contentType);
public VirtualFileResult (string fileName, string contentType);
new Microsoft.AspNetCore.Mvc.VirtualFileResult : string * string -> Microsoft.AspNetCore.Mvc.VirtualFileResult
Public Sub New (fileName As String, contentType As String)

Parameters

fileName
String

The path to the file. The path must be relative/virtual.

contentType
String

The Content-Type header of the response.

Applies to