SortedSet<T>.IsSubsetOf(IEnumerable<T>) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定对象是否 SortedSet<T> 为指定集合的子集。
public:
virtual bool IsSubsetOf(System::Collections::Generic::IEnumerable<T> ^ other);
public bool IsSubsetOf(System.Collections.Generic.IEnumerable<T> other);
abstract member IsSubsetOf : seq<'T> -> bool
override this.IsSubsetOf : seq<'T> -> bool
Public Function IsSubsetOf (other As IEnumerable(Of T)) As Boolean
参数
- other
- IEnumerable<T>
要与当前 SortedSet<T> 对象进行比较的集合。
返回
实现
例外
other 是 null。
注解
空集是任何其他集合的子集,包括空集;因此,此方法返回 true 由当前 SortedSet<T> 对象表示的集合为空,即使 other 参数为空集也是如此。
此方法始终返回 false 是否 Count 大于中的 other元素数。
如果表示的 other 集合是与 SortedSet<T> 当前 SortedSet<T> 对象具有相同相等比较器集合,则此方法是一个 O(n) 操作。 否则,此方法是一个 O(n + m) 操作,其中 n 是 Count 且 m 是其中的 other元素数。