I have a windows forms application, and it uses a class (which I made). Inside that class, I have this code:

StreamWriter sw = new StreamWriter("a.txt");

Currently, it is writing to the C:\ drive. Is there a way for me to make it write into my executable's folder without me having to changing it to:

StreamWriter sw = new StreamWriter(execPath + @"\a.txt");

where execPath is the path of the executable.