Changing CsvConfiguration after CsvWriter initialization #1851
Unanswered
b-maslennikov
asked this question in
Q&A
Replies: 1 comment
-
No it's essentially read only. All the values that the writer uses are copied local. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to change CsvConfiguration after CsvWriter initialization?
in older versions I used this:
using var csv = new CsvWriter(stream, culture); csv.Configuration.PrepareHeaderForMatch = x => x.Header.Trim().ToUpper();
now it doesn't work and I have to create csvConfiguration before writer initialization:
var config = new CsvConfiguration(culture) { PrepareHeaderForMatch = x => x.Header.Trim().ToUpper(); }; using var csv = new CsvWriter(stream, config);
I tried changing CsvConfiguration object in Context property:
csv.Context.CsvConfiguration.Prepare...
and it doesn't seem to bee working as well
Beta Was this translation helpful? Give feedback.
All reactions