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