## Collection::operator[](int) method


获取指定索引处的值。

```cpp
T & System::Collections::ObjectModel::Collection<T>::operator[](int index)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| 索引 | int | 获取值的索引。 |

### ReturnValue

对指定索引处现有值的引用。

## 另见

* Class [Collection](../)
* Namespace [System::Collections::ObjectModel](../../)
* Library [Aspose.Page for C++](../../../)
## Collection::operator[](int) const method


获取指定索引处的值。

```cpp
const T & System::Collections::ObjectModel::Collection<T>::operator[](int index) const
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| 索引 | int | 获取值的索引。 |

### ReturnValue

对指定索引处现有值的 const 引用。

## 另见

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