I have to do a c# search on records in an array from a sql server db
using 3 data elements. One of the data elements has to be a DateTime element in a column called DateOfBirth. Unfortunately there are a lot of null values in this column and I can't figure out how to compare a DateTime variable to a field with NULL values. I see a lot of answers that appear to be close to what I need here, but nothing has helped. Thanks for any help, This has been my format.
if ((DateTime)dt == (DateTime)temp[i].Individual.DateOfBirth)
GlobalNum3.bnum3 = 1;
NullReferenceException? What are the compile time types ofdtandDateOfBirth?...WHERE DateOfBirth IS NOT NULL [...]would do the job.