我帮你做好了!
- OpenFileDialog op = new OpenFileDialog();
- if (op.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- label1.Text = "文件路径:" + op.FileName;
- label2.Text = "文件名称:" + op.SafeFileName;
- label3.Text = "文件扩展名:" + op.SafeFileName.Split('.')[1];
- }
复制代码 |
|