Skip to content

BinaryFile Constructors ​

Overloads ​

NameDescription
BinaryFile(FileInfo)Initialises a new instance of the BinaryFile class from a file on disk.
BinaryFile(String, Stream)Initialises a new instance of the BinaryFile class from a Stream containing the file.
BinaryFile(String, IReadOnlyList<Byte>)Initialises a new instance of the BinaryFile class from a list of bytes containing the file.

BinaryFile(FileInfo) ​

Initialises a new instance of the BinaryFile class from a file on disk.

c#
public BinaryFile(FileInfo file);

View source

Parameters ​

NameTypeDescription
fileFileInfoA FileInfo with details a file on disk to load. The FullName will be used for Name.

BinaryFile(String, Stream) ​

Initialises a new instance of the BinaryFile class from a Stream containing the file.

c#
public BinaryFile(string name, Stream file);

View source

Parameters ​

NameTypeDescription
nameStringThe name of the file.
fileStreamA Stream containing the file. The stream will be read to the end and left open.

BinaryFile(String, IReadOnlyList<Byte>) ​

Initialises a new instance of the BinaryFile class from a list of bytes containing the file.

c#
public BinaryFile(string name, IReadOnlyList<Byte> bytes);

View source

Parameters ​

NameTypeDescription
nameStringThe name of the file.
bytesIReadOnlyList<Byte>The contents of the file.