如何将对象列表转换为csv? [英] How can I convert a list of objects to csv?
本文介绍了如何将对象列表转换为csv?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有一个名为Car的对象列表:
If I have a list of objects called "Car":
public class Car
{
public string Name;
public int Year;
public string Model;
}
如何转换对象列表列表< Car>到a csv?
How do I convert a list of objects, e.g. List<Car> to a csv?
推荐答案