private static int MoreSpecificType(Type t1, Type t2)
{
// The less-generic type is more specific
int result = GetTypeGenerity(t2) - GetTypeGenerity(t1);
if (result != 0) return result;
// If both types have the same generity, the deeper-nested type is more specific
return GetLogicalTypeDepth(t1) - GetLogicalTypeDepth(t2);
}