browse for folder in Console Application

后端 未结 3 521
小鲜肉
小鲜肉 2020-12-31 01:05

I currently have to code to allow me to read all of the files of a folder and write them to the console. Below, I also have got the code to select individual files from a di

3条回答
  •  孤城傲影
    2020-12-31 02:08

    User the FolderBrowserDialog

    FolderBrowserDialog b = new FolderBrowserDialog();
    
    if(b.ShowDialog() == DialogResult.OK)
    {
      var folderName = b.SelectedPath;
    }
    

提交回复
热议问题