标签:
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog fileName = new OpenFileDialog();
fileName.InitialDirectory = Application.StartupPath;
fileName.Filter = "所有文件(*.*)|*.*|菜单文件(*.md)|*.md";
fileName.FilterIndex = 2;
fileName.RestoreDirectory = true;
if (fileName.ShowDialog() == DialogResult.OK) {
//MessageBox.Show(fileName.FileName);
//Stream stream=fileName.OpenFile();
//StreamReader sr = new StreamReader(stream);
//BinaryReader br = new BinaryReader(stream, Encoding.Unicode);
}
}
标签:
原文地址:http://www.cnblogs.com/huangbingzhi/p/4836725.html