实现效果:

  获取应用程序所在目录_编程

知识运用:
  Application类的StartupPath属性

  public static string StartupPath {get;}

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = Application.StartupPath;
        }