© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
photonicphlebotomist

✅ Utilizing the extension filter for openfiledialog

Hello. I'm attempting to use this
openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
to filter for text files. However,I get an error that says
'OpenFileDialog' does not contain a definition for 'Filter' and no accessible extension method 'Filter' accepting a first argument of type 'OpenFileDialog' could be found (are you missing a using directive or an assembly reference?)
'OpenFileDialog' does not contain a definition for 'Filter' and no accessible extension method 'Filter' accepting a first argument of type 'OpenFileDialog' could be found (are you missing a using directive or an assembly reference?)
. I am on the newest version of the NET SDK,but I'm pretty sure that .Filter wasn't decapricated. What am i doing wrong?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ OpenFileDialog issue
C#CC# / help
3y ago
❔ Utilizing MEF For Containerized DLL Toolbox
C#CC# / help
3y ago
Memory leaks with OpenFileDIalog, SaveFIleDialog, and DataGridView in WinForms
C#CC# / help
2y ago
is linq capable of utilizing AVX1?
C#CC# / help
6mo ago