The first random exception of type "System.ComponentModel.Win32Exception" occurred in WindowsBase.dll

I have a .NET.NET WPF project.

When I open FileDialog, select some files and click OK, I see this error in the output window:

The first random error like "System.ComponentModel.Win32Exception" occurred in WindowsBase.dll

OpenFileDialog fileDialog = new OpenFileDialog();
            fileDialog.Multiselect = true;

            DialogResult result = fileDialog.ShowDialog();
            if (result == DialogResult.OK)
            {

Why am I getting this exception before the if-statement?

+5
source share
1 answer

, Win32Exception, WPF. WPF. API, , .

, .

+3

All Articles