OpenFileDialog - only display filenames that have no extensions
- by fraXis
Hello,
I have the following code in my C# program:
OpenFileDialog fDialog = new OpenFileDialog();
fDialog.Title = "Open a file";
fDialog.Filter =
"NCF files (*.ncf)|*.ncf|All files (*.*)|*.*|No Extensions (*.)|*.";
I want to be able to have the user pick from the following:
.NCF (files with .NCF extension only)
*.* (all files)
and files that have no extensions such as:
readme (with no .txt)
I know *.* will do this, but it also displays the .NCF, .TXT, and all other files in the same directory. I just want to be able to display filenames that have no extensions.
Filtering with *. does not do the trick.
Is there a way I can do this with C#?
Thanks.