mike_pro
asked on
Reading a file in c# using VS2005
Im currently reading a file off of my desktop and processing the contents. I want to attach this file to the project so that wherever this program is used it will still work.
I tried, project -> add component which adds the text file. However when using Streamreader etc what is the address that you put in? I tried just the name of the file e.g.
StreamReader t = new StreamReader("textfile.txt ");
but this didn't work.
Cheers guys.
I tried, project -> add component which adds the text file. However when using Streamreader etc what is the address that you put in? I tried just the name of the file e.g.
StreamReader t = new StreamReader("textfile.txt
but this didn't work.
Cheers guys.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome, thanks for the help!
> Awesome, thanks for the help!
you're welcome. Long time ago it took me ages to find out why things weren't copied... Glad to be of help ;-)
you're welcome. Long time ago it took me ages to find out why things weren't copied... Glad to be of help ;-)
So if your going to use a file from your desktop then you'll go to
C:\Documents and Settings\USER\Desktop\file
Hope this helps