|
-
Aug 23rd, 2011, 04:58 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] how come it's not writing the the executable's directory?
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|