C#获取应用程序路径

2021-07-10 17:07

阅读:356

标签:class   process   windows   table   应用程序   ref   str   .exe   程序   

            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;

 

C#获取应用程序路径

标签:class   process   windows   table   应用程序   ref   str   .exe   程序   

原文地址:https://www.cnblogs.com/xslwm/p/9674089.html


评论


亲,登录后才可以留言!