Hello
I'm trying to set a location/Path for my logFile but I cannot. It keeps creating it in the debug folder
StreamWriter logFile;
if (!File.Exists("logFile.txt"))
{
logFile = new StreamWriter(@"C:\logFile.txt");
}
else
{
logFile = File.AppendText("logFile.txt");
}
What is wrong in my code? and what if I need to create a specific folder (LogFolder) under C: Directory for example (if the folder does not exist) so that I can create the logFile inside of it.