MSDN模版
Stream myStream =null;
OpenFileDialog openFileDialog1 =newOpenFileDialog();
openFileDialog1.InitialDirectory="c:\\";
openFileDialog1.Filter="txt files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog1.FilterIndex=;
openFileDialog1.RestoreDirectory=true;
if(openFileDialog1.ShowDialog()==DialogResult.OK)
{
// open the file
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章