Async write text to a file using StreamWriter
suggest change// filename is a string with the full path
// true is to append
using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename, true))
{
// Can write either a string or char array
await file.WriteAsync(text);
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents