ImmutableSortedSet<T>.ISet<T>.Add(T) 方法

定義

將項目加入至目前資料集,並傳回表示是否成功加入項目的值。

 virtual bool System.Collections.Generic.ISet<T>.Add(T item) = System::Collections::Generic::ISet<T>::Add;
bool ISet<T>.Add (T item);
abstract member System.Collections.Generic.ISet<T>.Add : 'T -> bool
override this.System.Collections.Generic.ISet<T>.Add : 'T -> bool
Function Add (item As T) As Boolean Implements ISet(Of T).Add

參數

item
T

要加入至集合的項目。

傳回

如果項目加入至資料集,則為 true,如果項目已經在資料集中,則為 false

實作

備註

這個成員是明確介面成員實作, 只有在 ImmutableSortedSet<T> 執行個體轉換成 ISet<T> 介面時,才能使用這個成員。

System.Collections.Immutable NuGet 套件

關於不可變集合以及如何安裝

適用於