I have a dialog box that asks for user input in 3 textboxes and has 2
buttons: Ok & Cancel.
If the user input is validated, the box should return
DialogResult.OK. If the user input isn't validated, it should display
a message and return nothing at all, keeping the dialog box visible
until the input is validated or the user presses the cancel button.
The problem is that I can't choose between "return DialogResult.OK" or
just "return" (to keep the dialog visible) because they're different
return types.
I can think of a few ways to work around it, including validating the
input in the main form and re-displaying the dialog box if it fails,
but I'm wondering what the standard method of handling something like
this?