保存文件
1
FolderBrowserDialog foldFile = new FolderBrowserDialog();
2
if (foldFile.ShowDialog() == DialogResult.OK)
3
{
4
txtFileName.Text = openFile.SelectedPath;
5
}
打开指点的文件![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
1
OpenFileDialog openFile = new OpenFileDialog();
2
string fileName = string.Empty;
3
openFile.Filter = "*.dat|*.dat";
4
if (openFile.ShowDialog() == DialogResult.OK)
5
{
6
txtDownloadFile.Text = openFile.FileName;
7
(string.Empty);
8
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)