我收到以下错误:
Operator '??' cannot be applied to operands of type 'System.DateTime'
foreach (EndServReward r in reward)
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
myIfxCmd.Parameters[0].Value = r.EmpNum ;
myIfxCmd.Parameters[1].Value = (r.ServDate) ?? DBNull.Value;
}
在哪里reward is List<EndServReward> reward
,为什么会发生这种情况,以及如何解决?