System.Xml.NameTable.Add Method

Atomizes the specified string and adds it to the NameTable.

Syntax

public override string Add (char[] key, int start, int len)

Parameters

key
The character array containing the string to add.
start
The zero-based index into the array specifying the first character of the string.
len
The number of characters in the string.

Returns

The atomized string or the existing string if one already exists in the NameTable. If len is zero, String.Empty is returned.

Exceptions

TypeReason
IndexOutOfRangeException

start < 0.

- or -

start >= key.Length.

- or -

len > key.Length - start.

The above conditions do not cause an exception to be thrown if len = 0.

ArgumentOutOfRangeExceptionlen < 0.

Remarks

For more information on atomized strings, see System.Xml.NameTable.

Requirements

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