Hi,
Last night I was trying to append to a text file. After popping the
buzzwords into google I was directed to the MSDN site and I happily
coded away using an example as reference with File.Append.
It turns out File.Append is part of the full .NET and not the CF.NET
subset.
How can I restrict my searches for classes within CF.NET?
Is there no support in CF.NET for Perl's most excellant line-oriented
reading/writing, or is this the preferred way to create/append to a
file:
private void saveDetails(string client)
{
Stream s;
try
{
s = new FileStream(FILE_NAME, FileMode.Append);
}
catch (Exception e)
{
MessageBox.Show("cannot open file " + FILE_NAME + ": " +
e.ToString());
return;
}
for (int i = 0; i < client.Length; i++)
{
byte b;
b = (byte) client[i];
s.WriteByte(b);
}
s.Close();
lblSaveError.Text = "record saved";
}
Thanks,
Joe.