标签:blog os io ar div 代码 log sp new
为了以后自己方便查找,记录下来:
1. 引用命名空间, using Microsoft.VisualBasic.FileIO;
2. 关键代码:
var reader = new StreamReader(File.OpenRead(path1)); string[] values = null; using (var csvReader = new TextFieldParser(reader)) { while (!csvReader.EndOfData) { csvReader.SetDelimiters(new string[] { "," }); csvReader.HasFieldsEnclosedInQuotes = true; values = csvReader.ReadFields(); } }
标签:blog os io ar div 代码 log sp new
原文地址:http://www.cnblogs.com/minco/p/3940107.html