How do I get application full path & .exe?

 Posted by Kmandapalli on 2/19/2014 | Category: ASP.NET Interview questions | Views: 1964 | Points: 40
Answer:

string path = System.Reflection.Assembly.GetExecutingAssembly().Location.ToString();

It will return the full path and the name of the executable.

To get only the full path, you can use:
string pathOnly = Application.StartupPath.ToString();


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response