HOW TO GET APPLICATION DIRECTORY USING C#-CSHARP

Andrew Watson

Total Post:39

Points:273
Posted by  Andrew Watson
C# 
C#
 1780  View(s)
Ratings:
Rate this:
Hello everyone,
I am trying to get the directory of application root folder.
Please provide sample of code.
Thanks,
  1. Uttam Misra

    Post:125

    Points:897
    Re: How to get application Directory using C#-Csharp

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


Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!