Top "Streamwriter" questions

StreamWriter is designed for character output in a particular encoding, whereas classes derived from Stream are designed for byte input and output.

how to read special character like é, â and others in C#

I can't read those special characters I tried like this 1st way # string xmlFile = File.ReadAllText(fileName); 2nd way # FileStream …

c# file streamwriter
How To Overwrite A File If It Already Exists?

I'm making a music player. It has 2 forms; one is the main area where you play music. The second form …

c# .net winforms text-files streamwriter
Write a string to a file

I want to write something to a file. I found this code: private void writeToFile(String data) { try { OutputStreamWriter outputStreamWriter = …

android streamwriter
Remove all previous text before writing

I am writing a text file and each time i write i want to clear the text file. try { string …

c#-4.0 stream streamwriter
With StreamWriter doesn't work \n (C#)

I have a problem with the C# Stream Writer. I use the following Code: //Constructor public EditorTXTFile { FileStream f = File.…

c# newline streamwriter
how to use StreamWriter class properly?

I am using StreamWriter class for file operations, are there any problems in this code that I am not seeing? …

c# streamwriter
Writing to MemoryStream with StreamWriter returns empty

I am not sure what I am doing wrong, have seen a lot of examples, but can't seem to get …

c# memorystream streamwriter
how to clear text file content c#

i want clear text file contet with this method private void writeTextFile(string filePath, string text) { if (!File.Exists(filePath)) { …

c# streamwriter
simultaneous read-write a file in C#

I have a file containing data that I'd like to monitor changes to, as well as add changes of my …

c# filestream streamreader streamwriter
How to Write to a file using StreamWriter?

in my Wpf app I'm using a class Person (that is a base class), and that contains a virtual method …

c# .net io streamwriter