Welcome to MSDN Blogs Sign in | Join | Help

How to get the Base Directory of an application?

Well, to be honest that’s actually quite easy, nevertheless I keep forgetting it all the time (pretty much like Error 15023: User already exists in current database). Seems like I enter an age where my short term memory is already gone but the long term memory hasn’t arrived yet ;-)

So, without further frills, that’s how it works:

Dim myFile = String.Format("{0}\myFile.xml", _
                          AppDomain.CurrentDomain.BaseDirectory)

Happy coding!

   Daniel

Published Thursday, April 10, 2008 8:10 PM by Walzenbach

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# How to get the Base Directory of an application? | Easycoded

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker