I am currently checking if a property type is a DateTime or a nullable DateTime like this:
if (prop.PropertyType == typeof(DateTime) || prop.PropertyType == typeof(DateTime?))
Can anyone please tell me if I can somehow condense this into a single statement by checking the underlying type?
Aucun commentaire:
Enregistrer un commentaire