using System;
public class Program
{
public static void Main()
var t = new []{ typeof(DateTime?), typeof(DateTime) };
var tt = new []{ typeof(DateTime?), typeof(DateTime) };
foreach(var i in t)
foreach(var j in tt)
var res = i.IsAssignableTo(j);
Console.WriteLine($"{i}.IsAssignableTo({j}) = {res}");
}