Domanda

I must be missing something...

This is my code:

   OpenFileDialog o = new OpenFileDialog();
   o.Filter = "SQL Server Compact Edition Database File|.sdf";
   o.ShowDialog();

In the actual folder there is definitely a .sdf file:

enter image description here

And then in the file picker (the same folder) it doesn't show it:

enter image description here

Is it because it only works for certain types of files or something?

È stato utile?

Soluzione

I suspect you're just missing the * wildcard in the matching part:

o.Filter = "SQL Server Compact Edition Database File|*.sdf";
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top