Write a StringBuilder to a Text File with one line of code!
Posted: 12/6/2016 1:45:53 PMBy: PrintableKanjiEmblem
Times Read: 2,177
Likes: 0 Dislikes: 0
Topic: Programming: .NET Framework
This is pretty neat, I have always played around with building a StreamWriter to write to a text file, but now you can do it with one line of code:
System.IO.File.WriteAllText(@"C:\SomeDir\FileName.txt",sbContainingText.ToString());
Enjoy!
Rating: (You must be logged in to vote)