首先的引入 using System.IO;
OpenFileDialog file = new OpenFileDialog();
file.ShowDialog(); string selectfile = file.SafeFileName; FileInfo finfo = new FileInfo(selectfile); this.textBox1.Text = finfo.Directory.ToString() + @"\" + finfo.Name;本文共 292 字,大约阅读时间需要 1 分钟。
首先的引入 using System.IO;
OpenFileDialog file = new OpenFileDialog();
file.ShowDialog(); string selectfile = file.SafeFileName; FileInfo finfo = new FileInfo(selectfile); this.textBox1.Text = finfo.Directory.ToString() + @"\" + finfo.Name;转载于:https://www.cnblogs.com/zhushuangmei/p/7481705.html