## DictionaryPtr::operator[](const T\&) const method


Access operator.

```cpp
V & System::Collections::Generic::DictionaryPtr<T, V>::operator[](const T &key) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| key | const T\& | [Dictionary](../../dictionary/) key. |

### ReturnValue

Reference to value corresponding to the key passed, existing or newly created.

## See Also

* Class [DictionaryPtr](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.TeX for C++](../../../)
## DictionaryPtr::operator[](const X\&) const method


Access operator to work with key type conversion.

```cpp
template<class X> V & System::Collections::Generic::DictionaryPtr<T, V>::operator[](const X &key) const
```


| Parameter | Description |
| --- | --- |
| X | Source key type. |

| Parameter | Type | Description |
| --- | --- | --- |
| key | const X\& | [Dictionary](../../dictionary/) key. |

### ReturnValue

Reference to value corresponding to the key passed, existing or newly created.

## See Also

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