zoukankan      html  css  js  c++  java
  • C#选择文件保存路劲

    private void button8_Click(object sender, EventArgs e)
    {
    FolderBrowserDialog dialog = new FolderBrowserDialog();
    dialog.Description = "请选择文件路径";

    if (dialog.ShowDialog() == DialogResult.OK)
    {
    string foldPath = dialog.SelectedPath;
    DirectoryInfo theFolder = new DirectoryInfo(foldPath);

    //theFolder 包含文件路径

    FileInfo[] dirInfo = theFolder.GetFiles();
    //遍历文件夹
    foreach (FileInfo file in dirInfo)
    {
    MessageBox.Show(file.ToString());
    }
    }
    }

  • 相关阅读:
    POJ
    POJ
    HDU
    HDU
    HDU
    POJ
    HDU
    POJ
    A-meeting 2019牛客暑期多校第四场 (树的直径)
    算法与数据结构实验题 2.1 塔防
  • 原文地址:https://www.cnblogs.com/LCLBook/p/11339664.html
Copyright © 2011-2022 走看看