得到本地应用程序的EXE的路径

Posted on 2019-01-21 13:56  努力成长静待花开  阅读(334)  评论(0编辑  收藏  举报

实现效果:

  

知识运用:

  Application类的ExecutablePath属性    //获取启动了应用程序的可执行文件的路径和可执行文件的名称

     public static string ExecutablePath ( get;);

实现代码:

        private void Form1_Load(object sender, EventArgs e)
        {
            richTextBox1.Text = "EXE文件路径:" + Application.ExecutablePath;
        }