Set CheckFileExists to true : SaveFileDialog « GUI Windows Form « C# / C Sharp
- C# / C Sharp
- GUI Windows Form
- SaveFileDialog
Set CheckFileExists to true
using System;
using System.Windows.Forms;
class MainClass {
static void Main(string[] args) {
SaveFileDialog dlg = new SaveFileDialog();
dlg.CheckFileExists = true;
if (dlg.ShowDialog() == DialogResult.OK) {
Console.WriteLine(dlg.FileName);
}
}
}
Related examples in the same category