Is OpenFileDialog's filter case sensitive in Mono?

It appears that my code is finding only those files with the same capitalization as my filter:

        OpenFileDialog fDialog = new OpenFileDialog();
        fDialog.Title = "Pick an XLSX file";
        fDialog.Filter = "Excel Files|*.xlsx";
        fDialog.InitialDirectory = @"C:\Develop\Samples\";
        if (fDialog.ShowDialog() != DialogResult.OK) {

On .Net, files with either upper or lower case appear, but under Mono on my Mac I only get the lower case ones.

Can someone suggest a simple way to address this? I don't want to have to have two entries, is there a way to put several extensions in one entry in the filter?

Best Answer


  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭

    Unix based OS (Linux, OSX...) have case sensitive filenames, unlike Windows.

  • Ok, so what do I do about it? I need users to be able to open "XLSX" and "xlsx" files.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    This is clearly not a Xamarin.Forms question so I moved it to Cross Platform (since it's also not quite a Xamarin.Mac question).

Sign In or Register to comment.