Edit

Share via


BinaryData.FromFile Method

Definition

Overloads

FromFile(String)

Creates a BinaryData instance from the specified file.

FromFile(String, String)

Creates a BinaryData instance from the specified file and sets MediaType to <see pref="mediaType"></see> value.

FromFile(String)

Source:
BinaryData.cs

Creates a BinaryData instance from the specified file.

public:
 static BinaryData ^ FromFile(System::String ^ path);
public static BinaryData FromFile(string path);
static member FromFile : string -> BinaryData
Public Shared Function FromFile (path As String) As BinaryData

Parameters

path
String

The path to the file.

Returns

A value representing all of the data from the file.

Applies to

FromFile(String, String)

Source:
BinaryData.cs

Creates a BinaryData instance from the specified file and sets MediaType to <see pref="mediaType"></see> value.

public:
 static BinaryData ^ FromFile(System::String ^ path, System::String ^ mediaType);
public static BinaryData FromFile(string path, string? mediaType);
static member FromFile : string * string -> BinaryData
Public Shared Function FromFile (path As String, mediaType As String) As BinaryData

Parameters

path
String

The path to the file.

mediaType
String

The MIME type of this data, for example, Octet.

Returns

A value representing all of the data from the file.

See also

Applies to