I am developing exporting data in xpdl format. There are 2 options – version 2.1 and 2.2. I am using SaveFileDialog, but how can I distinguish between those 2 options?
SaveFileDialog dlg = new SaveFileDialog();
dlg.Filter = "xpdl 2.1|*.xpdl|xpdl 2.2|*.xpdl";
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
//how can I check, which format is selected?
}
You can get or set selected filter for dialogs by checking FilterIndex property. And as stated in msdn:
So for your task it would be: