我正在尝试将代码从 wpf 复制到 winforms(此代码在 wpf 中工作)
public static bool? ShowSettingsDialogFor(ICustomCustomer)
{
if (cust is BasicCustomer)
{
return (new BCustomerSettingsDialog()).ShowDialog();
}
}
我收到编译错误消息
无法将类型“System.Windows.Forms.DialogResult”隐式转换为“bool?”