Skip to content

Block Class ​

Definition ​

Base class for a block in a file that is composed of a header, data and a trailer.

c#
public abstract class Block : IOFileComponent

View source

Constructors ​

NameDescription
Block(Header, Trailer, Int32)Initializes a new instance of the Block class with zero-filled data of the specified length.
Block(Header, Trailer, Int32, Stream)Initializes a new instance of the Block class by reading data from a stream.
Block(Header, Trailer, Int32, IEnumerable<Byte>)Initializes a new instance of the Block class from a sequence of bytes.
Block(Header, Trailer, Byte[])Initializes a new instance of the Block class from a byte array.

Properties ​

NameDescription
HeaderGets the header for this block.
TrailerGets the trailer for this block.

Methods ​

NameDescription
LoadInto(Span<Byte>)Loads the block data into the specified memory span.
TryLoadInto(Span<Byte>)Attempts to load the block data into the specified memory span.