How to get application Directory using C#-Csharp

Total Post:39

Points:273

C# 
C#
 2331  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. 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

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.