Skip to content

"Deleted" flag is ignored in the DbfRecord constructor #10

Open
@blackandwhitebg

Description

@blackandwhitebg

In the Write method, the 0x20 is correctly added, but when a record is being read, the DbfRecord can't tell if it's a deleted record or not.

It can be improved with 2 lines of code -

  1. Add a "Deleted" bool property to the DbfRecord class
public bool Deleted { get; private set; }
  1. Set its value in the DbfRecord constructor immediately after the "marker" variable declaration
// Read record marker.
byte marker = reader.ReadByte();
Deleted = marker == 0x2A;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions