Thanks a lot. Thats what i ve been searching for ...
I have been trying to create a StreamWriter-Object without creating a
previos filestram, and in this structure i didnt find a way to specify the
Encodeng ....
Wish you a nice weekend.
Martin
> Do you mean you want the file written in plain ASCII?
>
> This appears to produce a simple ASCII text file:
>
> FileStream FS = new FileStream("d:\\myfile.txt",FileMode.OpenOrCreate);
> StreamWriter SW = new StreamWriter(FS, Encoding.ASCII);
Peter Duniho - 08 Dec 2007 07:41 GMT
> I have been trying to create a StreamWriter-Object without creating a
> previos filestram, and in this structure i didnt find a way to specify
> the
> Encodeng ....
Why there's no StreamWriter(String, Encoding) overload, I don't know. But
there are other overloads for the StreamWriter constructor that take a
file name and an encoding. For example:
http://msdn2.microsoft.com/en-us/library/f5f5x7kt.aspx
Pete