---
title: "System::Collections::Generic::IReadOnlyDictionary::TryGetValue method"
url: "https://reference.aspose.com/pdf/cpp/system.collections.generic/ireadonlydictionary/trygetvalue/"
product: "Aspose.PDF for C++ API Reference"
description: "System::Collections::Generic::IReadOnlyDictionary::TryGetValue method. Looks for value and retreives it if found in C++."
---

## IReadOnlyDictionary::TryGetValue method


Looks for value and retreives it if found.

```cpp
virtual bool System::Collections::Generic::IReadOnlyDictionary<TKey, TValue>::TryGetValue(const TKey &key, TValue &value) const =0
```


| Parameter | Type | Description |
| --- | --- | --- |
| key | const TKey\& | Key to look for. |
| value | TValue\& | Reference to store retreived value into. |

### ReturnValue

True if value was found and retreived, false otherwise.

## See Also

* Class [IReadOnlyDictionary](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
