JoshClose / CsvHelper

Library to help reading and writing CSV files
http://joshclose.github.io/CsvHelper/
Other
4.65k stars 1.05k forks source link

Nullability Annotations #2182

Open tanveerbadar opened 11 months ago

tanveerbadar commented 11 months ago

CsvHelper doesn't have nullability annotations.

Apply nullability annotations to various types as appropriate.

I cannot rely on this great library supporting compiler's nullability analysis at this point in time.

Take CsvReader.ReadHeader() for instance. It should have an annotation of [MemberNotNullWhen(true, nameof(HeaderRecord))]. Otherwise, users are forced to check the return value and header not being null for shutting up the compiler.