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.

Re: What classes does CF.NET support? by Daniel

Daniel
Fri Sep 09 15:23:39 CDT 2005

> How can I restrict my searches for classes within CF.NET?
Each member has a comment if it is " Supported by the .NET Compact
Framework."

You can use intellisense especially in VS2005 where the story gets better:
http://www.danielmoth.com/Blog/2005/04/intellisense-for-cf-v20.html

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

"Joe" <joe.williams@hotmail.co.uk> wrote in message
news:1124782799.805075.15220@g44g2000cwa.googlegroups.com...
> 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.
>