Skip to main content
6 events
when toggle format what by license comment
Feb 18, 2020 at 21:34 comment added iSR5 @Anve In ParseValue method the condition if (value.Length == 0) would cover the whitespace part, so if any of these data returns whitespace it would or the whole line is null, then it would return null for that specific part or line, so in your validation method, you start by checking nulls for string, and for -1 for int properties. then do the rest required validation on each non-null properties.
Feb 18, 2020 at 20:31 comment added TJacken thank you that is what I looking for, now I need to made some method for validating my data, because I need to validate if I have data about author in database, and other data. I will post my method tomorrow to see if there are possible enhancements.
Feb 18, 2020 at 19:33 comment added iSR5 @Anve I have updated the answer with the attribute solution, I hope it would be useful.
Feb 18, 2020 at 19:32 history edited iSR5 CC BY-SA 4.0
added 2987 characters in body
Feb 18, 2020 at 18:36 comment added TJacken thank you for your explanation and approach, I don't have too much experience in c# but I would try to add custom attribute for specifying start and end position for specific data, I don't know if it is possible but I will try, your example are simple and good for me :)
Feb 18, 2020 at 17:25 history answered iSR5 CC BY-SA 4.0