zoukankan      html  css  js  c++  java
  • open file C#

       private void button13_Click(object sender, EventArgs e)
            {
                OpenFileDialog ofd = new OpenFileDialog();
                ofd.Filter = "Word Documents(*.doc)|*.doc";
                ofd.ShowDialog();
                textBox3.Text = ofd.FileName;
            }

       private void button12_Click(object sender, EventArgs e)
            {
                if (textBox3.Text.Length > 0)
                {
                    readFileContent(textBox3.Text);
                }
                else
                {
                    MessageBox.Show("Enter a valid file path");
                }
            }

       private void readFileContent(string path)
            {

               ...

            }

  • 相关阅读:
    mysql热备脚本
    linux系统编程-进程
    15-模块
    14-面向对象3
    13-面向对象2
    12-面向对象1
    02-对比两个文件的差异
    11-面向对象基础
    08-不定长函数
    07-缺省参数
  • 原文地址:https://www.cnblogs.com/greencolor/p/1636789.html
Copyright © 2011-2022 走看看