LoadFile(String,Byte[]) Method
- Last UpdatedNov 06, 2025
- 1 minute read
Function to load data from the specified file into the specified reference variable This overload returns binary data to a byte array variable Throw an exception if any error occurs - the calling function must catch it
'Declaration
Public Overloads Shared Sub LoadFile( _
ByVal filePath As String, _
ByRef returnedData() As Byte _
)
'Usage
Dim filePath As String
Dim returnedData() As Byte
FileHelper.LoadFile(filePath, returnedData)
public static void LoadFile(
string filePath,
out byte[] returnedData
)
Parameters
- filePath
- The complete filename including its path as a string to load the data from
- returnedData
- The contents of the file as a byte array returned as an out parameter