日期:2014-05-17 浏览次数:20768 次
this.openFileDialog1.InitialDirectory = "F:\\";
this.openFileDialog1.Filter = "(*.txt)
------解决方案--------------------
*.txt";
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)//加这句话
{
string path = openFileDialog1.FileName;//获得path
}