Math
April 14, 2021, 6:32pm
1
List list = new List
{
“one”,
“two”,
“three”
};
string flatList = list.ToCsv(); //value of flatList = "one,two,three\r\n"
//trying to get back the original list:
var originalList = flatList.FromCsv<List>();
// originalList here is a List with a single value of “one,two,three\r\n”
I would have expected the original list of 3 string back… ?
Thanks for reporting, I reproduced the issue with unit tests and a fix in this PR .
This change is available from the latest v5.10.5 that’s now available on MyGet .
Math
April 15, 2021, 2:08pm
3
Awesome. Will you keep the trailing \r\n ?
That’s currently in the latest MyGet and converts between typed and CSV output correctly. Feel free to let us know your use case where this might be causing issues.
1 Like