实现效果:
知识运用:
Environment类的CurrentDirectory属性 //获取或设置当前工作目录的完全限定路径
public staitc string CurrentDirectory {get; set;}
实现代码:
private void Form1_Load(object sender, EventArgs e) { richTextBox1.Text = "当前程序运行目录: "+Environment.CurrentDirectory; }