Home > DeveloperSection > Forums > How to get application Directory using C#-Csharp
Andrew Watson
Andrew Watson

Total Post:39

Points:273
Posted on    April-23-2011 4:22 AM

 C# C# 
Ratings:


 1 Reply(s)
 1527  View(s)
Rate this:
Hello everyone,
I am trying to get the directory of application root folder.
Please provide sample of code.
Thanks,


Uttam Misra

Total Post:125

Points:897
Posted on    April-23-2011 4:28 AM

private static string GetAppFolderName( )
{
    string configPath = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
    FileInfo configFile = new FileInfo(configPath);
    return configFile.DirectoryName;
}



Don't want to miss updates? Please click the below button!

Follow MindStick