Take a look at System.IO.Path[^] class, it performs operations on string instances that contain file or directory path information.
To read/write a file, that is located where your program runs, you can uses something like this:
Hide Copy Code
string fileToRead = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\MyOtherFile.xml"; string allDataFromFile = System.IO.File.ReadAllText(fileToRead);


0 comments:
Post a Comment
Note: only a member of this blog may post a comment.