## BaseSet::TryAdd method


向集合中添加元素。

```cpp
bool System::Collections::Generic::BaseSet<T, SET_T>::TryAdd(const T &item)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| item | const T\& | 要添加的项。 |

### ReturnValue

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

## 另见

* Class [BaseSet](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.Page for C++](../../../)
