Struct FileRecordRange
A span of an open file, in records or in bytes depending on the channel's mode — a Lock or
Unlock statement's record-range (MS-VBAL §5.4.5.4).
public readonly record struct FileRecordRange : IEquatable<FileRecordRange>
- Implements
- Inherited Members
Remarks
Both ends are inclusive, and both are one-based, so Start is never 0 in a range a
program asked for — which is what lets 0 To 0 mean EntireFile rather than being a
range at all.
Constructors
FileRecordRange(long, long)
A span of an open file, in records or in bytes depending on the channel's mode — a Lock or
Unlock statement's record-range (MS-VBAL §5.4.5.4).
public FileRecordRange(long Start, long End)
Parameters
StartlongThe first record or byte in the span.
EndlongThe last record or byte in the span, inclusive.
Remarks
Both ends are inclusive, and both are one-based, so Start is never 0 in a range a
program asked for — which is what lets 0 To 0 mean EntireFile rather than being a
range at all.
Properties
End
The last record or byte in the span, inclusive.
public long End { get; init; }
Property Value
EntireFile
The whole file — what a Lock or Unlock with no record-range applies to.
public static FileRecordRange EntireFile { get; }
Property Value
IsEntireFile
Whether this is the whole file rather than a span within it.
public bool IsEntireFile { get; }
Property Value
Start
The first record or byte in the span.
public long Start { get; init; }