public class NameTable : 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 '.
//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!");
| ctor #1 | Default constructor. This constructor is called by derived class constructors to initialize state in this type. Initializes a new instance of the NameTable class. |
| Add | Overloaded:Add(string key)Overridden: Atomizes the specified string and adds it to the NameTable. For more information on atomized strings, see NameTable. |
| Add | Overloaded:Add(char[] key, int start, int len)Overridden: Atomizes the specified string and adds it to the NameTable. For more information on atomized strings, see NameTable. |
| 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 value)Overridden: Gets the atomized string with the specified value. For more information on atomized strings, see NameTable. |
| Get | Overloaded:Get(char[] key, int start, int len)Overridden: 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 NameTable. |
| 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. |
| 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:
public NameTable(); |
For more information on atomized strings, see NameTable.
key
For more information on atomized strings, see NameTable.
key
start
len
| Exception Type | Condition |
|---|---|
| IndexOutOfRangeException | If 0 > start >= key.Length or 0 > len >= key.Length - len. |
~NameTable(); |
For more information on atomized strings, see NameTable.
value
For more information on atomized strings, see NameTable.
key
start
len
| Exception Type | Condition |
|---|---|
| IndexOutOfRangeException | If 0 > start >= key.Length or 0 > len >= array.Length - start. |
public virtual int GetHashCode(); |
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual string ToString(); |