HOW TO GET APPLICATION DIRECTORY USING C#-CSHARP

Total Post:39

Points:273
C# 
C#
 2081  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. Post:127

    Points:915
    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!