Write a StringBuilder to a Text File with one line of code!
Posted: 12/6/2016 1:45:53 PM
By:
Times Read: 2,031
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)