0

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?

1 Answers1

5

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

o.Filter = "SQL Server Compact Edition Database File|*.sdf";
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194