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.

Adding a Line to the Middle of a File with .NET

Hello I am working on something, and I need to be able to be able to add text into a .…

c# .net streamreader streamwriter
C# add text to text file without rewriting it?

Let's say I have the following code: StreamWriter sw = new StreamWriter(File.OpenWrite(Path)); sw.Write("Some stuff here"); sw.…

c# file filestream streamwriter
What consumes less resources and is faster File.AppendText or File.WriteAllText storing first in StringBuilder?

I have to write thousands of dynamically generated lines to a text file. I have two choices, Which consumes less …

c# performance streamwriter .net
c# HttpWebRequest POST'ing failing

So i'm trying to POST something to a webserver. System.Net.HttpWebRequest EventReq = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("…

c# httpwebrequest webrequest streamwriter
C# Write to multiple files without constantly closing/reopening streams. SteamWriter?

I am trying to read in a table from an Access database, and then sort the data in that table …

c# streamwriter split streamwriter.write
c# can i create a dynamic file name with streamwriter?

I was trying to make the program write to a file that was named with a time stamp. Basically, saving …

c# timestamp streamwriter
Using StreamWriter to implement a rolling log, and deleting from top

My C# winforms 4.0 application has been using a thread-safe streamwriter to do internal, debug logging information. When my app opens, …

c# winforms logging file-io streamwriter
How can I tell if a streamwriter is closed?

I'm using a streamwriter in combination with a background worker, for logging. As such, I have System::Void MyUI::execBWorker_…

.net c++-cli clr backgroundworker streamwriter
Thread safe StreamWriter C# how to do it? 1

What is the best way to build a program that is thread safe in terms that it needs to write …

c# .net multithreading streamwriter
Writing to file using StreamWriter much slower than file copy over slow network

I have a program that attempts to write quite a large amount of text to a file on a remote …

c# performance networking streamwriter