Hello ))
Guys tell me please - in which folder should I put the file ( a few folders in one project), so that the program will be able to "read" it. if the path = "something.txt".
Thanks in advance ))
vedro-compota
33
Posting Whiz
Recommended Answers
Jump to Postif you want to read the file from the debuf folder in your current project you simply bind the text file, like:
string startupPath2 = Application.StartupPath + @"\something.txt"; //or maybe without backslash! try it(I am doing this code by my heart).
Jump to PostIf you dont use the sign "@" on the beginning of the path`s string, you have to write double back slashes for seperating folder. Example:
string path1 = @"C:\myFoler\myFile.txt";
string path2 = "C:\\myFolder\\myFile.txt";I hope you see the difference between these two examples.
Mitja
All 6 Replies
Mitja Bonca
557
Nearly a Posting Maven
Mitja Bonca
557
Nearly a Posting Maven
vedro-compota
33
Posting Whiz
Mitja Bonca
557
Nearly a Posting Maven
vedro-compota
33
Posting Whiz
iconoclazt
11
Newbie Poster
vedro-compota
commented:
+++++
+1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.