Missing App.Path

If you have the need to load resources (XSL stylesheets, images etc etc) at runtime, you may need to know the path of the currently executing code. In VB6 you'd just use good old App.Path, here is the .Net equivalent.

 using System.IO;

 string Location = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
Author Lee Keable

Comments

Sameer said:

Hey thnx..

tat was helpful..

30/Mar/2007 14:08 PM

Add Comment

Name
Comment
 

Your comment has been received and will be shown once it passes moderation.