OpenFileDialog.ShowDialog() Causes StackOverflowException

  • Thread starter Thread starter Will Chen via .NET 247
  • Start date Start date
W

Will Chen via .NET 247

In C#, I kept on running into StackOverflowException in Main().After some investigation, it looks like this happens whenever Icall ShowDialog on an instance of OpenFileDialog.

So here's what I did: I started a new windows form, added onebutton, and copied the OpenFileDialog sample code from MSDN intothe button's event handler. I get a StackOverflowException afterthe OpenFileDialog is done (Open, Cancel or otherwise) Thisrepros every time.

Has anyone run into this problem?

I'm running VS.NET 2003 on Windows XP SP1.
 
Back
Top