i'm trying reproduce code wpf winforms (this code works inside wpf)
public static bool? showsettingsdialogfor(icustomcustomer) { if (cust basiccustomer) { return (new bcustomersettingsdialog()).showdialog(); } }
i'm getting compile error message
cannot implicitly convert type 'system.windows.forms.dialogresult' 'bool?'
change
return (new bcustomersettingsdialog()).showdialog() == dialogresult.ok;
Comments
Post a Comment