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

System.Xml.XmlNameTable.Add Method

Adds the string equivalent of a specified subset of a char array to the table if the string equivalent does not already exist in the table. [Edit]

public abstract string Add (char[] buffer, int offset, int length)

Parameters

buffer
Documentation for this section has not yet been entered. [Edit]
offset
A int specifying the zero-based index into the array of the first character of the string. [Edit]
length
A int containing the number of characters in the string. [Edit]

Returns

The string equivalent of the specified subset of the char array that is stored in the table, or string.Empty if length is zero. [Edit]

Exceptions

TypeReason
IndexOutOfRangeException

offset < 0.

- or -

offset >= array.Length.

- or -

length > array.Length - offset.

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

[Edit]
ArgumentOutOfRangeExceptionlength < 0. [Edit]

Remarks

Operation
Only a single instance of any given string is stored in the table. Calling this method with the same subset (containing the same characters) of any char array, returns the same instance of the string equivalent.

Note to Inheritors
This method must be overridden in order to provide the functionality described above, as there is no default implementation.

[Edit]

Requirements

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