Get App Folder - CSharp System.Reflection

CSharp examples for System.Reflection:Assembly

Description

Get App Folder

Demo Code


using System.Reflection;
using System.Linq;
using System.IO;/*from   w  ww.j a v  a2  s.  co  m*/
using System.Diagnostics;
using System;

public class Main{
        public static string GetAppFolder()
        {
            return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            //return Directory.GetParent(filename).FullName;
        }
}

Related Tutorials