ISet<T>.IsProperSubsetOf(IEnumerable<T>) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定当前集是否为指定集合的正确(严格)子集。
public:
bool IsProperSubsetOf(System::Collections::Generic::IEnumerable<T> ^ other);
public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable<T> other);
abstract member IsProperSubsetOf : seq<'T> -> bool
Public Function IsProperSubsetOf (other As IEnumerable(Of T)) As Boolean
参数
- other
- IEnumerable<T>
要与当前集进行比较的集合。
返回
true 如果当前集是适当的子集 other,则为 ;否则为 false。
例外
other 是 null。
注解
如果当前集是适当的子集 other, other 则必须至少有一个当前集没有的元素。
空集是任何其他集合的子集。 因此,此方法返回 true 当前集为空,除非 other 参数也是空集。
如果当前集的元素other数大于或相同,则此方法始终返回false。