Quote Originally Posted by Evil_Giraffe View Post
If you mean without changing these lines to include a full path:

csharp Code:
  1. StreamWriter sw = new StreamWriter("a.txt");

That will always write to the current working directory. I cannot stress enough that to change the working directory to the application's folder is not the behaviour expected of a Windows program. It is possible to do, but for the above mentioned reasons I am not going to signpost the way for you.
So the proper programming "etiquette" is to NOT put any output files (created by the program) in the executable's folder/subfolder? (Assuming the user is not given any choice to which path to save it to)