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