Having an issue with casting a datetime from a reader where the value is null.
form._date101 = reader[52] == DBNull.Value ? DBNull.Value : (DateTime?)reader[52];
getting: Type of conditional expression cannot be determined because there is no implicit conversion between 'System.DBNull' and 'System.DateTime?'
any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…