Answers for "c# write stringbuilder to file create"

C#
0

c# stringbuilder to file

using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"\hereIam.txt"))
{
    file.WriteLine(sb.ToString()); // "sb" is the StringBuilder
}
Posted by: Guest on September-25-2020
0

c# stringbuilder to file

System.IO.File.WriteAllText(@"C:\TextFile.txt", stringBuilder.ToString());
Posted by: Guest on September-25-2020

C# Answers by Framework

Browse Popular Code Answers by Language