开发者

How to read .csv file extension in .net C#

开发者 https://www.devze.com 2023-01-31 13:37 出处:网络
How to read .csv fil开发者_JS百科e extension in .net C#I just write my own - it\'s a one-liner! using System.IO.File;

How to read .csv fil开发者_JS百科e extension in .net C#


I just write my own - it's a one-liner!

using System.IO.File;

return ReadAllLines(@"C:\V3.txt").Select(line => line.Split(',')).ToList();

This will return a list where each item is a string[], contain each of the comma separated values.


FileHelper has mostly done the trick for me and it iss easy to use and has reasonable examples at the home page: http://www.filehelpers.com/

0

精彩评论

暂无评论...
验证码 换一张
取 消