SyntaxFix
Write A Post
Hire A Developer
Questions
You have to specify the folder where you are saving it and it has to exist, in other case it will throw an error.
var s = txt.CreateTextFile("c:\\11.txt", true);