I try, when I press save in SaveFileDialog
I do something. I trying fix but always something wrong.
SaveFileDialog dlg2 = new SaveFileDialog();
dlg2.Filter = "xml | *.xml";
dlg2.DefaultExt = "xml";
dlg2.ShowDialog();
if (dlg2.ShowDialog() == DialogResult.OK)
{....}
But I have error on OK - which say:
Error: 'System.Nullable' does not contain a definition for 'OK' and no extension method 'OK' accepting a first argument of type 'System.Nullable' could be found (are you missing a using directive or an assembly reference?)
I try fix with this code:
DialogResult result = dlg2.ShowDialog(); //here is error again
if (result == DialogResult.OK)
{....}
Now error is on DialogResult say: 'System.Windows.Window.DialogResult' is a 'property' but is used like a 'type'