获取临时文件目录

Posted on 2019-01-07 22:40  努力成长静待花开  阅读(233)  评论(0编辑  收藏  举报

实现效果:

  

知识运用:

  Path类的GetTempPath方法

  public static string GetTempPath ()

实现代码:

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