C# make a file code example
Example 1: how to create a file in c#
// File class is in the System.IO namespace
FileStream file = File.Create(path);
file.Close()
Example 2: create a file in the directory of the exe and write to it c#
string GuarnteedWritePath = System.Environment.
GetFolderPath(
Environment.SpecialFolder.CommonApplicationData
);
string FilePath = Path.Combine(GuarnteedWritePath, "LogFile.txt");