I have to open a file dialog. In that I have to choose one file either an XML or MAP file. If the choosen file is MAP file then I have to do step-A or if the choosen file is XML then I have to do step-B. My question is how to know which file is selected from the dialog box application?
OpenFileDialog fileDialog1 = new OpenFileDialog();
fileDialog1.Filter = "XML Files|*.xml|MAP Files|*.map";
fileDialog1.ShowDialog();
How to know which file is selected from the above filter ?