💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
``` FolderBrowserDialog fbdlg = new FolderBrowserDialog(); fbdlg.Description = "请选择文件路径"; if (fbdlg.ShowDialog() == DialogResult.OK) { string foldPath = fbdlg.SelectedPath; textBox1.Text = foldPath; return; DirectoryInfo theFolder = new DirectoryInfo(foldPath); FileInfo[] dirInfo = theFolder.GetFiles(); //遍历文件夹 foreach (FileInfo file in dirInfo) { MessageBox.Show(file.ToString()); } } ```