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>

要與目前資料組比較的集合。

傳回

如果目前資料集是 other 的正確子集,則為 true,否則為 false

例外狀況

othernull

備註

如果目前的集合是 適當的子集 otherother 則必須至少有一個目前集合沒有的專案。

空集合是任何其他集合的適當子集。 因此,如果目前的集合是空的,則這個方法會 true 傳回 ,除非 other 參數也是空的集合。

如果目前集合的元素other數目大於 或相同數目,這個方法一律會傳回 false

適用於