I'm using CSVHelper to read in lots of data
I'm wondering if it's possible to read the last n
columns in and transpose them to a list
"Name","LastName","Attribute1","Attribute2","Attribute3"
And mould the data into something like this
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public IList<string> Attributes { get; set; }
}
I'm looking to do this in one step, I'm sure I could have an intermediate step where I put into an object with matching attribute properties but it would be nice to do it on a one-er
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…