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

定义

确定当前集是否为指定集合的超集。Determines whether the current set is a superset of a specified collection.

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

参数

other
IEnumerable<T>

要与当前集进行比较的集合。The collection to compare to the current set.

返回

Boolean

如果当前集是 other 的超集,则为 true;否则为 falsetrue if the current set is a superset of other; otherwise, false.

例外

othernullother is null.

注解

如果 other 包含与当前集相同的元素,则当前集仍被视为的超集 otherIf other contains the same elements as the current set, the current set is still considered a superset of other.

false如果当前集的元素少于,则此方法始终返回 otherThis method always returns false if the current set has fewer elements than other.

适用于