bin

bpayne111

Junior Contributor
Joined
Feb 28, 2003
Messages
325
Location
BFE
When filenames are used in code in vs.net projects, if they have no path included they go to the bin by default.
I think that is wonderful but, when an application is distributed it brings an issue to mind.

If i create a file with a filestream and set it's filename to "myfile.ext"
obviously it goes to the bin
but if i distribute this application where does it go?

If it throws an exception in this case. What can i use to create the same effect on the distributed app? I vaguely rememebr the Application.Path method but i believe that was vb 6 or something.

To take it a little deeper...
Would throwing this file in the current users "My Documents" folder automatically be a bad idea?

thanks
brandon
 
but if i distribute this application where does it go?

If you don't code any path for the file it will be created in the same folder the app is installed, to control any error you should use the try,catch,finally statement to control them
 
Back
Top