This is my code broken down:
fileName = string.Concat("C:", @"\test.txt");
StreamWriter sw = new StreamWriter(fileName, false);
StringBuilder row = new StringBuilder();
row.AppendLine("Test");
sw.Write(row.ToString());
sw.Close();
This code does not generate a file, nor does it give an error. If I change the first line to filename = "test.txt";
then the program creates the file in the same location as the exe (bin/debug) and writes the text to it. How can I get the program to write to a different path besides the path the exe is located in?