easy file writing

Hi,
For some reason text tiles are not written? This is very simple but it is not working.

StreamWriter outStream = null;
string outFileName = "mydata.txt";

try
{
outStream = new StreamWriter(outFileName);
log.Info("Got to outStream");

}
catch (Exception e)
{
log.Info("NOOOO");
MessageBox.Show(e.ToString());
}

Would anyone have any idea why?

Cheers,
Gareth.

[445 byte] By [maxi_byte] at [2008-1-28]
# 1
Hi,

you did not call the write() Methode. Check this out:


StreamWriter strw = new StreamWriter("c:\\test.txt");

strw.WriteLine("strw");

strw.Close();


rgerbig at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...