Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public static void CreateFile()
{
string str = "test string to stream";
MainClass.WriteOutput(str);
}
public static void WriteOutput(string str)
{
string path = @"C:\marty\CSharp\textfile.txt";
using (StreamWriter stw = new StreamWriter(path))
{
try
{
stw.WriteLine(str);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}