## IDictionary::GetValueOrDefault(const TKey\&) const method


如果找到则返回值；否则返回 **Value()**。

```cpp
virtual TValue System::Collections::Generic::IDictionary<TKey, TValue>::GetValueOrDefault(const TKey &key) const
```

## 另见

* Class [IDictionary](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.Font for C++](../../../)
## IDictionary::GetValueOrDefault(const TKey\&, const TValue\&) const method


如果找到则返回值；否则返回 **defaultValue**。

```cpp
virtual TValue System::Collections::Generic::IDictionary<TKey, TValue>::GetValueOrDefault(const TKey &key, const TValue &defaultValue) const
```

## 另见

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