System::Collections::Generic::BaseSet::TryAdd 方法

BaseSet::TryAdd method

向集合中添加元素。

bool System::Collections::Generic::BaseSet<T, SET_T>::TryAdd(const T &item)
参数类型描述
const T&要添加的项。

ReturnValue

如果元素已添加则返回 true,如果已存在则返回 false。

另见