Read a binary file. This method reads a small binary file. Since it does not implement a cache, it is not suitable for large files.

Namespace: LLCryptoLib.Utils
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public byte[] ReadBinaryFile(
	string filePath
)
Visual Basic
Public Function ReadBinaryFile ( _
	filePath As String _
) As Byte()
Visual C++
public:
array<unsigned char>^ ReadBinaryFile(
	String^ filePath
)

Parameters

filePath
Type: System..::..String
Absolute Path of file to read from.

Return Value

Byte contents of the file.

Remarks

In case this method return false, check ErrorMessage

Examples

byte[] myFile = myFileObj.ReadBinaryFile(@"C:\log.txt");

Exceptions

ExceptionCondition
LLCryptoLib..::..LLCryptoLibExceptionInput file too long
System..::..ArgumentNullException

See Also