BiffFormatException Class
Definition
The exception thrown when BIFF data is structurally invalid: a record header is truncated, a declared payload runs past the available data, or a known record's payload does not match its documented layout.
public sealed class BiffFormatException : FormatException, ISerializable
- Inheritance
-
BiffFormatException
- Implements
- Inherited Members
- Extension Methods
Remarks
A record type the codec does not recognize is never reported through this exception; unknown records remain readable through their identifier and raw payload. When the failure is tied to a position in the data, Offset carries the byte offset of the record header relative to the start of the buffer the reader was created over.
Constructors
BiffFormatException()
Initializes a new instance of the BiffFormatException class.
public BiffFormatException()
BiffFormatException(string?)
Initializes a new instance of the BiffFormatException class with the specified message.
public BiffFormatException(string? message)
Parameters
messagestringThe message that describes the error.
BiffFormatException(string?, Exception?)
Initializes a new instance of the BiffFormatException class with the specified message and inner exception.
public BiffFormatException(string? message, Exception? innerException)
Parameters
BiffFormatException(string?, int)
Initializes a new instance of the BiffFormatException class with the specified message and the offset of the record at which the failure was detected.
public BiffFormatException(string? message, int offset)
Parameters
Properties
Offset
Gets the byte offset of the record at which the failure was detected, relative to the start of the buffer the reader was created over.
public int? Offset { get; }
Property Value
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |