Josh Close
Josh Close
`RegisterClassMap` has an overload that takes in a map, so you can do this: ```cs var map = new CsvBaseModelClassMap(CultureInfo.GetCultureInfo("whatever-WHATEVER")); csv.Context.RegisterClassMap(map); ```
https://github.com/JoshClose/CsvHelper/blob/808dea2456b9c695eed1c124f67a2385e88b8a81/src/CsvHelper/CsvContext.cs#L136
Is there a reason you can't call new? Like do you only know the type at runtime?
If you have only a single column, why do you want to detect the delimiter? There isn't one to detect. You could set the delimiter to some character that you...
Before you run the file through CsvHelper, read the first line in and determine if it's a single column file, then set the config accordingly. For me to do this...
I think `ReadingExceptionOccurred` does what you're looking for. It gives you the `CsvHelperException` that occurred, which contains the context. You return `true` for the given exception to be thrown, or...
@BenMakesGames There is an issue for this. https://github.com/JoshClose/CsvHelper/issues/2048 It explains the issues regarding this. There is a discussion that no one has commented on yet regarding it too. https://github.com/JoshClose/CsvHelper/discussions/2052 I...
Are you setting `Encoding`? That is required for `CountBytes` to work. I should probably add that to the configuration validation.
Let me know what you find out.
I don't understand. You only access the fields that you want to.