public abstract class XmlNameTable
|
The names are stored as common language runtime object types. This enables you to do object comparisons on these strings rather than a more expensive string comparison. These string objects are referred to as ' atomizedstrings '.
XmlNameTable is implemented in the NameTable class.
//Create the reader. XmlTextReader rdr = new XmlTextReader("book.xml"); NameTable nt = new NameTable(); String name = nt.Add("book"); while (rdr.Read()){} if (rdr.NameTable.Get("book") == name) Console.WriteLine("matches!");
Add | Overloaded:Add(string array) When overridden in a derived class, atomizes the specified string and adds it to the XmlNameTable. For more information on atomized strings, see XmlNameTable. |
Add | Overloaded:Add(char[] array, int offset, int length) When overridden in a derived class, atomizes the specified string and adds it to the XmlNameTable. For more information on atomized strings, see XmlNameTable. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
Get | Overloaded:Get(string array) When overridden in a derived class, gets the atomized string containing the same value as the specified string. For more information on atomized strings, see XmlNameTable. |
Get | Overloaded:Get(char[] array, int offset, int length) When overridden in a derived class, gets the atomized string containing the same characters as the specified range of characters in the given array. For more information on atomized strings, see XmlNameTable. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
ctor #1 | Default constructor. This constructor is called by derived class constructors to initialize state in this type. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
protected XmlNameTable(); |
For more information on atomized strings, see XmlNameTable.
array
For more information on atomized strings, see XmlNameTable.
array
offset
length
Exception Type | Condition |
---|---|
IndexOutOfRangeException | If 0 > offset >= array.Length or 0 > length >= array.Length - offset. |
~XmlNameTable(); |
For more information on atomized strings, see XmlNameTable.
array
For more information on atomized strings, see XmlNameTable.
array
offset
length
Exception Type | Condition |
---|---|
IndexOutOfRangeException | If 0 > offset >= array.Length or 0 > length >= array.Length - offset. |
public virtual int GetHashCode(); |
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual string ToString(); |