E
Eric
I'm trying to do a linq query of a class's PropertyInfo[] to retrieve all
properties that are of type nullable datetime.
Unfortunately, it's not working, I never get anything back. I've replaced
DateTime? with <Nullable<DateTime>>
PropertyInfo[] pi = cust.GetType().GetProperties();
List<DateTime?> dateFields = (from prop in pi.OfType<DateTime?>()
where prop == DateTime.MaxValue || prop == DateTime.MinValue
select prop).ToList<DateTime?>();
properties that are of type nullable datetime.
Unfortunately, it's not working, I never get anything back. I've replaced
DateTime? with <Nullable<DateTime>>
PropertyInfo[] pi = cust.GetType().GetProperties();
List<DateTime?> dateFields = (from prop in pi.OfType<DateTime?>()
where prop == DateTime.MaxValue || prop == DateTime.MinValue
select prop).ToList<DateTime?>();