打开和保存文件

it2022-05-31  73

打开和保存文件

打开文件:

Microsoft.Win32.OpenFileDialog open = new Microsoft.Win32.OpenFileDialog(); open.Multiselect = false; open.Filter = "表格(*.CSV)|*.CSV"; Nullable<bool> flag = open.ShowDialog(); if (flag == true) { string filename = open.FileName; }

 

保存文件:

Microsoft.Win32.SaveFileDialog save = new Microsoft.Win32.SaveFileDialog(); save.Filter = "表格(*.CSV)|*.CSV"; Nullable<bool> flag = save.ShowDialog(); if (flag == true) { string filename = save.FileName; }

 

 

posted on 2010-08-13 10:37 彬子 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/wangzb/archive/2010/08/13/1798775.html


最新回复(0)