If this is an application with UI, the best option for most cases would be using "Save As" dialog, so the user would be able to choose the directory.
However, using a working directory is quite typical, especially for console-only applications. Apparently, this directory could still be considered as a part of the user input: this is the directory where the user started the application. If you do it this way, you can use the file name without path, because the working directory will have precedence. Note that the application directory and working directory are different directories: a user can start the application in any directory.
[EDIT]
Also pay attention for our discussion with Richard MacCutchan, who gave you important warning about application directory. This is the directory where you executable module is placed (which is, in turn, has nothing to do with the installation; the application can work without any installations). Generally, this directory is intended to provide only read-only access to files.
Working directory is something different: this is where the user chooses to start the application (and the application can later change it), the default directory for relative path names. If the user choose the directory with write access (which is can be well expected), writing will be possible. :-)
[END EDIT]
For finding the directories associated with some application explicitly, please see my past answers:
How to find my programs directory (
executable directory),
How to find my programs directory (
current directory, "special folders").
Never use string concatenation and other string operation for finding file names and path names. Note some useful methods of the class
System.IO.Path
, in particular:
https://msdn.microsoft.com/en-us/library/system.io.path.combine%28v=vs.110%29.aspx[
^] (do not concatenate, use these methods!),
https://msdn.microsoft.com/en-us/library/system.io.path.getfilename(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/system.io.path.getfilenamewithoutextension(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/system.io.path.getfullpath(v=vs.110).aspx[
^], and so on.
—SA