Description
When using WriteFields as a shorthand for writing records without a record object, it seems that no header is written, even though one has been designated. Is this the expected behavior, or should it be consistent with writing records using record objects?
Note that the non-header records are written as expected.
public class ChoWriterTest { [Fact] public void WriteHeaderAndFields() { using var writer = new StringWriter(); using var choWriter = new ChoCSVWriter(writer).WithFirstLineHeader(); choWriter.WriteHeader("A", "B"); choWriter.WriteFields("A1", "B1"); choWriter.WriteFields("A2", "B2"); choWriter.Flush(); writer.Flush(); var result = writer.ToString(); Assert.StartsWith("A,B", result); } }