예제 #1
0
        public override bool IsSubType(DataType other)
        {
            // List covariance works because lists are immutable
            var otherList = other as ListType;

            return(otherList != null && _elementType.IsSubType(otherList.ElementType));
        }
예제 #2
0
 /// <summary>
 /// Compares two DataType instances for sub-type.
 /// </summary>
 /// <returns>True if the first type is a subtype (or the same type) as the second type, false otherwise.</returns>
 public static bool SubTypeOf(DataType a, DataType b)
 {
     return a != null && b != null && a.IsSubType(b);
 }
예제 #3
0
 /// <summary>
 /// Compares two DataType instances for sub-type.
 /// </summary>
 /// <returns>True if the first type is a subtype (or the same type) as the second type, false otherwise.</returns>
 public static bool SubTypeOf(DataType a, DataType b)
 {
     return(a != null && b != null && a.IsSubType(b));
 }