BinaryData.FromFile Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Returns
A value representing all of the data from the file.