ISet<T>.IsProperSubsetOf(IEnumerable<T>) 方法

定义

确定当前集是否为指定集合的正确(严格)子集。

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

例外

othernull

注解

如果当前集是适当的子集 otherother 则必须至少有一个当前集没有的元素。

空集是任何其他集合的子集。 因此,此方法返回 true 当前集为空,除非 other 参数也是空集。

如果当前集的元素other数大于或相同,则此方法始终返回false

适用于