## IDictionary::TryGetValue method


查找值并在找到时检索它。

```cpp
virtual bool System::Collections::Generic::IDictionary<TKey, TValue>::TryGetValue(const TKey &key, TValue &value) const =0
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| 键 | const TKey\& | 要查找的键。 |
| value | TValue\& | 用于存储检索到的值的引用。 |

### ReturnValue

如果找到并检索到值则为 true，否则为 false。

## 另见

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