I recently was looking up how to open a file browser dialog box, when I came across this documentation. Now, looking down at the example, it shows:
if(openFileDialog1.ShowDialog() == DialogResult.OK)
However, if I type that out, Intellisense doesn't recognize the OK
. In fact, its not even an option. I'm having to use :
if(openFileDialog1.ShowDialog() == true)
Am I missing something stupid, or is this an oversight in the documentation?
You're looking for the documentation for the Windows Forms Form.ShowDialog
method.
I suspect you're actually using WPF, where Window.ShowDialog
returns a Nullable<bool>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With