I got a weird error message when I tried to convert an object
to bool
, here is my code:
public partial class ModifierAuteur : DevExpress.XtraEditors.XtraForm
{
public ModifierAuteur(object getKeyDecesCheckBox)
{
decesCheckBox.Checked = getKeyDecesCheckBox == null ? null : (bool)getKeyDecesCheckBox;
}
}
and this is the error message :
Type of conditional expression cannot be determined because there is no implicit conversion between
<null>
andbool