If system time 12:00 am my application variable value will be
null.. I am trying to get null value of application but that time i'll
make some actions to that page.. So pls tell me how i'll make null
I'm not sure I understand your question, but if you're asking how to set
a DateTime to null, the answer is, you can't, it's a value type.
However, you can use a nullable version of DateTime (if you are using
the latest C# version).
Something like this:
//-----------------------------------------
private DateTime? MyTime()
{
DateTime? now = DateTime.Now;
if ( now.Value.TimeOfDay == new TimeSpan( 0, 0, 0 ) )
now = null;
return now;
}
//-----------------------------------------
By the way, DateTime? is just a syntactic shortcut for:
Nullable<DateTime>
I hope I answered the right question. :)
David