Mono Class Library: System.Xml.NameTable Overview | Members

System.Xml.NameTable.Add Method

Adds the specified string to the table if a string instance with the same value does not already exist in the table. [Edit]

public override string Add (string key)

Parameters

key
The string to add. [Edit]

Returns

key, if it did not exist in the table at the time of the call, or the string instance previously stored in the table with a value equal to key. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionkey is null. [Edit]

Remarks

Only a single instance of any given string is stored in the table. If the value of key is already stored in the table, the string instance with that value is returned.

Note:

This method overrides XmlNameTable.Add(Char[], int, int)(String).

[Edit]

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0