Adds an element with the specified String key and String value to the IStringStringDictionary.

Namespace: CodeSmith.CustomProperties
Assembly: CodeSmith.CustomProperties (in CodeSmith.CustomProperties.dll) Version: 6.0.0.0 (7.0.0.15127)

Syntax

C#
void Add(
	string key,
	string value
)
Visual Basic
Sub Add ( 
	key As String,
	value As String
)

Parameters

key
Type: System..::..String
The String key of the element to add to the IStringStringDictionary.
value
Type: System..::..String
The String value of the element to add to the IStringStringDictionary. This argument can be a null reference.

Remarks

Please refer to Add(Object, Object) for details.

Exceptions

ExceptionCondition
System..::..ArgumentException

An element with the specified key already exists in the IStringStringDictionary.

-or-

The IStringStringDictionary is set to use the IComparable interface, and key does not implement the IComparable interface.

System..::..ArgumentNullExceptionkey is a null reference.
System..::..InvalidOperationException The comparer throws an exception.
System..::..NotSupportedException

The IStringStringDictionary is read-only.

-or-

The IStringStringDictionary has a fixed size.

See Also