Version

Add(String,Object) Method

Adds an element with the provided key and value to the IDictionary.
Syntax
'Declaration
 
Public Overloads Sub Add( _
   ByVal key As String, _
   ByVal value As Object _
) 
public void Add( 
   string key,
   object value
)

Parameters

key
The object to use as the key of the element to add.
value
The object to use as the value of the element to add.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionkey is null.
System.ArgumentExceptionAn element with the same key already exists in the IDictionary.
System.NotSupportedExceptionThe IDictionary is read-only.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also