List
String[] arr = System.IO.File.ReadAllLines("file_path");
string temp;
foreach(string item in arr)
{
string[] tmpArr = item.Split(new char[]{','});
tmpArr[1]=你的处理
result.Add(tmpArr[0]+","+tmpArr[1]);
}
System.IO.File.WriteAllLines("file_path",result.toArray(),Encoding.Default);
大概的思路,参考下
全部读入,
改变部分数据,
全部写入。