Cannot implicitly convert from dialog result to bool

.net, c#, winforms

Solution

change that to

return (new BCustomerSettingsDialog()).ShowDialog() == DialogResult.OK;

Problem

I'm trying to reproduce code from wpf to winforms (this code works inside wpf) ``` public static bool? ShowSettingsDialogFor(ICustomCustomer) { if (cust is BasicCustomer) { return (new BCustomerSettingsDialog()).ShowDialog(); } } ``` I'm getting compile error message Cannot implicitly convert type 'System.Windows.Forms.DialogResult' to 'bool?'

Original source