---
title: "Class DictionaryExtensions | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.ExtensionMethods/DictionaryExtensions/"
---

# Class DictionaryExtensions

> **Inheritance:** `System.Object` -> DictionaryExtensions

###### **Namespace**: [Aurigma.DesignAtoms.ExtensionMethods](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.ExtensionMethods.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public static class DictionaryExtensions
```

## Inherited Members

* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Methods

### GetOrAdd&lt;TKey, TValue&gt;

```csharp
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> valueFactory)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Collections.Generic.IDictionary<<TKey>,<TValue>>` | *dictionary* |  |
| `<TKey>` | *key* |  |
| `System.Func<<TKey>,<TValue>>` | *valueFactory* |  |

##### Returns

`<TValue>`
