C#获取应用程序路径

            string s = Environment.CurrentDirectory;
            //需添加Forms.DLL
            s = System.Windows.Forms.Application.StartupPath;
            s = System.Windows.Forms.Application.ExecutablePath;


            s = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
            s = System.Reflection.Assembly.GetEntryAssembly().Location;

 

posted @ 2018-09-19 13:29  xslwm  阅读(321)  评论(0编辑  收藏  举报