ShouldQuote depending on field value? #2259
Answered
by
JoshClose
rorourke-iot
asked this question in
Q&A
Replies: 1 comment 3 replies
-
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
{
ShouldQuote = args =>
{
if (args.Field.Length == 0)
{
return true;
}
return ConfigurationFunctions.ShouldQuote(args);
}
}; |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
rorourke-iot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My investigation of the values in an instance of
ShouldQuoteArgs
leads me to believe the answer to my question is "no". That said, I'm asking anyway in case I'm missing something regarding getting to the value of a particular field I'm evaluating within aShouldQuote
configuration.Basically, looking to quote empty fields (along with any other field value which would normally get quoted).
Beta Was this translation helpful? Give feedback.
All reactions