First off, correct your code so it compiles: C# is case sensitive, so
OpenFileDialog_Import
is not the same as
openFileDialog_Import
:
OpenFileDialog OpenFileDialog_Import = new OpenFileDialog();
^
|
...
if (openFileDialog_Import.ShowDialog() == DialogResult.OK)
^
|
You need to do this for every reference, obviously.
If that doesn't fix the problem, then set the
FileDialog.FilterIndex Property (System.Windows.Forms) | Microsoft Docs[
^] property