ISet<T>.Add(T) 方法
定义
向当前集内添加元素,并返回一个指示是否已成功添加元素的值。Adds an element to the current set and returns a value to indicate if the element was successfully added.
public:
bool Add(T item);
public bool Add (T item);
abstract member Add : 'T -> bool
Public Function Add (item As T) As Boolean
参数
- item
- T
要添加到集中的元素。The element to add to the set.
返回
如果该元素已添加到集内,则为 true;如果该元素已在集内,则为 false。true if the element is added to the set; false if the element is already in the set.