Path to file in project

How can I get the entire path to a file in the project?
For example, settings.xml

Instead of hard coding C:\Documents and Settings\... etc

LVL 8
JRockFLAsked:
Who is Participating?
 
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
Environment.CurrentDirectory will give you the path of your project (where is the exe file)
0
 
ianmair329Connect With a Mentor Commented:
Use:

Application.StartupPath & "settings.xml"

eg...

Messagebox.Show(Application.StartupPath & "settings.xml")

Open in new window

0
 
JRockFLAuthor Commented:
Thank you!
0
All Courses

From novice to tech pro — start learning today.