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

定义

确定集是否为指定集合的子集。

public:
 bool IsSubsetOf(System::Collections::Generic::IEnumerable<T> ^ other);
public bool IsSubsetOf(System.Collections.Generic.IEnumerable<T> other);
abstract member IsSubsetOf : seq<'T> -> bool
Public Function IsSubsetOf (other As IEnumerable(Of T)) As Boolean

参数

other
IEnumerable<T>

要与当前集进行比较的集合。

返回

true 如果当前集是一个子集, other则为 ;否则为 false

例外

othernull

注解

如果 other 包含与当前集相同的元素,则当前集仍被视为其他元素的子集。

如果当前集具有不在中的other元素,则此方法始终返回false

适用于