我需要读取然后写出我当前记录的记录。
这是我到目前为止的代码:
private void ShipRecords()
{
using (TextReader tr = File.OpenText(appSettings.CreditCardTranFile))
{
var strLine = string.Empty;
string[] arrColumns = null;
while ((strLine = tr.ReadLine()) != null)
{
arrColumns = strLine.Split('\t');
if (arrColumns[0] == "A")
{
if (PublishRecord(arrColumns))
{
arrColumns[0] = "P";
// I need to save here
}
}
}
tr.Close();
}
}
此时如何通过更改将记录写回?