---
title: "XmpDictionaryNode.Add Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_XmpDictionaryNode_Add_2_df764941.htm
product: "Graphics Mill"
---

# XmpDictionaryNode.Add Method 
 
Adds an element with the provided key and value to the [XmpDictionaryNode](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_XmpDictionaryNode.htm.md) object.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public virtual void Add(Object key,Object value
)
```
 
### Parameters
 
 - key
     - Type: System.Object
The Object to use as the key of the element to add.

 - value
     - Type: System.Object
The Object to use as the value of the element to add.
 
## Remarks
  
You can also use the [Item\[Object\]](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_XmpDictionaryNode_Item_1_d02429b3.htm.md) property to add new elements by setting the value of a key that does not exist in the dictionary. However, if the specified key already exists in the dictionary, setting the [Item\[Object\]](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_XmpDictionaryNode_Item_1_d02429b3.htm.md) property overwrites the old value. In contrast, the [XmpDictionaryNode](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_XmpDictionaryNode.htm.md) method throws an exeption if an element with the same key already exists in the dictionary.
   
## See Also

### Reference

- [XmpDictionaryNode Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_XmpDictionaryNode.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
