OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Title = " 请选择您要导入的模板文件:";
            openFileDialog.Filter = "TextDocument(*.txt)|*.txt|TextDocument(*.ini)|*.ini";
            openFileDialog.ShowDialog();
            if (openFileDialog.FileName != "")//判断文件名是否为空
            {
                StreamReader streamReader = new StreamReader(openFileDialog.FileName, Encoding.Default);
                this.txtextBox.Text = streamReader.ReadToEnd();
            }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-01-20
  • 2021-06-19
  • 2021-08-03
  • 2022-01-14
猜你喜欢
  • 2022-01-12
  • 2021-05-21
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案