| Author |
Writing a Sequential File
|
|
| jerry chapman 2005-02-01, 8:58 pm |
| I what to write lines to a simple sequentil file from my C# program. How can
I do that?
| |
|
| create an instance of StreamWriter (from System.IO) and use its WriteLine
method, for example
"jerry chapman" <jerryc314@sbcglobal.net> wrote in message
news:QaVLd.26302$wZ2.17979@newssvr13.news.prodigy.com...
>I what to write lines to a simple sequentil file from my C# program. How
>can
> I do that?
>
>
| |
|
| i.e. something like
using System.IO;
using(StreamWriter w = new StreamWriter("somefile.txt"))
{
w.WriteLine("the first line");
w.WriteLine("the second and last line");
}
any good?
"Joep" <Staat@DeStoep.nl> wrote in message
news:420021ed$0$28991$e4fe514c@news.xs4all.nl...
> create an instance of StreamWriter (from System.IO) and use its WriteLine
> method, for example
>
> "jerry chapman" <jerryc314@sbcglobal.net> wrote in message
> news:QaVLd.26302$wZ2.17979@newssvr13.news.prodigy.com...
>
>
| |
| jerry chapman 2005-02-03, 8:58 pm |
| Thanks, that worked!
"Joep" <Staat@DeStoep.nl> wrote in message
news:420022a0$0$28986$e4fe514c@news.xs4all.nl...
> i.e. something like
>
> using System.IO;
>
> using(StreamWriter w = new StreamWriter("somefile.txt"))
> {
> w.WriteLine("the first line");
> w.WriteLine("the second and last line");
> }
>
> any good?
>
> "Joep" <Staat@DeStoep.nl> wrote in message
> news:420021ed$0$28991$e4fe514c@news.xs4all.nl...
WriteLine[color=darkred]
>
>
|
|
|
|