create file at program path C# code example
Example: 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");