// 文件路径
string companyFilePath = temp_data_dir + "\\" + "companies.csv";
StreamReader sr = new StreamReader(companyFilePath, System.Text.Encoding.Default);
string strLine = sr.ReadLine();
List<string[]> list = new List<string[]>();
// 遍历文件内容
while ((strLine = sr.ReadLine()) != null)
{
string[] tokens = strLine.Split(",");
list.Add(tokens);
}
// 取得每行数据的字段值
for (int i = 0; i < list.Count; i++)
{
string key = list[i][0].Replace("\"", "");
string value = list[i][1].Replace("\"", "");
string code = list[i][2].Replace("\"", "");
}