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)); }
/// <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); }
/// <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)); }