Adds an element with the provided key and value to the list.

Namespace: Spire.Doc.Collections
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 9.6.1.0 (9.6.1.3020)

Syntax

            
 C#  Visual Basic  Visual C++  F# 
public virtual void Add(
	TKey key,
	TValue value
)
Public Overridable Sub Add ( 
	key As TKey,
	value As TValue
)
public:
virtual void Add(
	TKey key, 
	TValue value
)
abstract Add : 
        key : 'TKey * 
        value : 'TValue -> unit 
override Add : 
        key : 'TKey * 
        value : 'TValue -> unit 

Parameters

key
TKey
The Object to use as the key of the element to add.
value
TValue
The Object to use as the value of the element to add.

Implements

IDictionary<(Of <(<'TKey, TValue>)>)>..::..Add(TKey, TValue)

Exceptions

ExceptionCondition
System..::..ArgumentNullException When key is null.
System..::..ArgumentException When list already contains specified key.

See Also