using System;
public class Program
{
public class X
public DateTime? Y;
}
public static void Main()
var xx = new X();
// Value not set
if (xx.Y.HasValue)
Console.WriteLine("1 w00t");
else
Console.WriteLine("1 haha");
// Value set to null
xx.Y = null;
Console.WriteLine("2 w00t");
Console.WriteLine("2 haha");
xx.Y = DateTime.MinValue;
Console.WriteLine("3 w00t");
Console.WriteLine("3 haha");