comparing dates in c# taking null value into account
- by Saif
Hi
I am new to c#. I am comparing two dates where one is entered by user and the other one is sytem date time. i have the code working as it stands where the obstacle has occured is how to cater for null values. the basic code I have is:
if (mydate.ToShortDateString() != TodaysDate.ToShortDateString())
{
//Error Messaage
}
else
{
//do some code
}
Any feedback will be appreciated