C# How To Get The Application Path

Do you like this?

Summary:
This short snippet shows you various ways to get the application path.


Content:

string method1= System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
string method2= System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase );

 
comments powered by Disqus