1 June 2012

Application Path in Windows application in C#


Application Path in Windows application in C#

string exeFilePath = System.Reflection.Assembly.GetEntryAssembly().Location;
//Output:D:\Arun\SupportTools\PathForWindowsApplication\PathForWindowsApplication\bin\Debug\PathForWindowsApplication.exe

string exeDirectory = System.IO.Path.GetDirectoryName(exeFilePath);
//Output:D:\Arun\SupportTools\PathForWindowsApplication\PathForWindowsApplication\bin\Debug




No comments:

Post a Comment

Comments Welcome

Implementing OAuth validation in a Web API

 I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...