I'm busy working on a simple XML formatter. Now I've got the app doing everything I want, except that I have to give it the absolute path of the XML file I'm using. Is there any way to get te relative path of such a file if it is known that it is in the same project folder as the application itself? Thanks in advance.

Mark

string relPath = System.IO.Path.Combine(Application.StartupPath,"YourFile.xml");

;) Thanks for the help. Managed to get it working

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.