Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
blackandwhitebg opened this issue Nov 5, 2019 · 0 comments
Open

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

blackandwhitebg opened this issue Nov 5, 2019 · 0 comments

Comments

@blackandwhitebg
Copy link

blackandwhitebg commented Nov 5, 2019

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant