Re: saving file

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Joerg Jooss (joerg.jooss_at_gmx.net)
Date: 01/02/05


Date: Sun, 2 Jan 2005 17:39:00 +0100

Ciaran wrote:
> the C# Version:
>
> string allmytext = "blah blah blah";
>
> SaveFileDialog sfd = new SaveFileDialog();
>
> sfd.FileName = @"c:\text\text.txt";
>
> System.IO.StreamWriter sw = new
> System.IO.StreamWriter(sfd.OpenFile());
> sw.Write(allmytext);
>
> sw.Flush();
>
> sw.Close();

But the user can still change the file name and the directory. My point was
that a dialog that leaves you no option is moot ;-)

Cheers,

-- 
Joerg Jooss
www.joergjooss.de
news@joergjooss.de