<?xml version="1.0" encoding="utf-8"?>
<Type Name="NameTable" FullName="System.Xml.NameTable" FullNameSP="System_Xml_NameTable" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public NameTable extends System.Xml.XmlNameTable" />
  <TypeSignature Language="C#" Value="public class NameTable : System.Xml.XmlNameTable" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit NameTable extends System.Xml.XmlNameTable" />
  <MemberOfLibrary>XML</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System.Xml</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>This class is multi-read threadsafe but not threadsafe for read/write.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.Xml.XmlNameTable</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <example>
      <para> The following example demonstrates the difference between
      equal string values and equal <see cref="T:System.String" qualify="true" /> objects using
      the <see cref="T:System.Xml.NameTable" />
      class.
      </para>
      <code lang="C#">using System;
using System.Text;
using System.Xml;

class Ntable {

  public static void Main() {

    NameTable nameTable = new NameTable();

    string str1 = "sunny";
    StringBuilder strBuilder = new StringBuilder();
    string str2 = 
      strBuilder.Append("sun").Append("ny").ToString();
    Console.WriteLine( "{0} : {1}",
                       str1, str2 );
    Console.WriteLine( "{0} : {1}",
                       str1 == str2,
                       (Object)str1==(Object)str2 );

    string str3 = nameTable.Add(str1);
    string str4 = nameTable.Add(str2);
    Console.WriteLine( "{0} : {1}",
                       str3, str4 );
    Console.WriteLine( "{0} : {1}",
                       str3 == str4,
                       (Object)str3==(Object)str4 );
  }
}
   </code>
      <para>The output is</para>
      <para>sunny : sunny</para>
      <para>True : False</para>
      <para>sunny : sunny</para>
      <para>True : True</para>
    </example>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Several classes, such as <see cref="T:System.Xml.XmlDocument" /> and <see cref="T:System.Xml.XmlReader" />, use the NameTable class internally to store attribute and element names. When an element or attribute name occurs multiple times in an XML document, it is stored only once in the NameTable.</para>
      <para>The names are stored as common language runtime (CLR) 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 atomized strings.</para>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Implements a single-threaded <see cref="T:System.Xml.XmlNameTable" />.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" />
      <MemberSignature Language="C#" Value="public NameTable ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters />
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Constructs an empty NameTable.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the NameTable class.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Add">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual string Add(string key)" />
      <MemberSignature Language="C#" Value="public override string Add (string key);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string Add(string key) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="key" Type="System.String" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="key" /> is <see langword="null" />.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>For more information on atomized strings, see <see cref="T:System.Xml.NameTable" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Atomizes the specified string and adds it to the NameTable.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The atomized string or the existing string if it already exists in the NameTable.</para>
        </returns>
        <param name="key">
          <attribution license="cc4" from="Microsoft" modified="false" />The string to add. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Add">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual string Add(class System.Char[] key, int32 start, int32 len)" />
      <MemberSignature Language="C#" Value="public override string Add (char[] key, int start, int len);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string Add(char[] key, int32 start, int32 len) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="key" Type="System.Char[]" />
        <Parameter Name="start" Type="System.Int32" />
        <Parameter Name="len" Type="System.Int32" />
      </Parameters>
      <Docs>
        <exception cref="T:System.IndexOutOfRangeException">
          <para>
            <paramref name="start" /> &lt; 0.</para>
          <para>- or -</para>
          <para>
            <paramref name="start" /> &gt;= <paramref name="key" />.Length.</para>
          <para>- or -</para>
          <para>
            <paramref name="len" /> &gt; <paramref name="key" />.Length - <paramref name="start" />.</para>
          <para>The above conditions do not cause an exception to be thrown if <paramref name="len" /> = 0.</para>
        </exception>
        <exception cref="T:System.ArgumentOutOfRangeException">len &lt; 0.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>For more information on atomized strings, see <see cref="T:System.Xml.NameTable" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Atomizes the specified string and adds it to the NameTable.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The atomized string or the existing string if one already exists in the NameTable. If <paramref name="len" /> is zero, String.Empty is returned.</para>
        </returns>
        <param name="key">
          <attribution license="cc4" from="Microsoft" modified="false" />The character array containing the string to add. </param>
        <param name="start">
          <attribution license="cc4" from="Microsoft" modified="false" />The zero-based index into the array specifying the first character of the string. </param>
        <param name="len">
          <attribution license="cc4" from="Microsoft" modified="false" />The number of characters in the string. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Get">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual string Get(string value)" />
      <MemberSignature Language="C#" Value="public override string Get (string value);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string Get(string value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.String" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="value" /> is <see langword="null" />.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>For more information on atomized strings, see <see cref="T:System.Xml.NameTable" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the atomized string with the specified value.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The atomized string object or null if the string has not already been atomized.</para>
        </returns>
        <param name="value">
          <attribution license="cc4" from="Microsoft" modified="false" />The name to find. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Get">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual string Get(class System.Char[] key, int32 start, int32 len)" />
      <MemberSignature Language="C#" Value="public override string Get (char[] key, int start, int len);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string Get(char[] key, int32 start, int32 len) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="key" Type="System.Char[]" />
        <Parameter Name="start" Type="System.Int32" />
        <Parameter Name="len" Type="System.Int32" />
      </Parameters>
      <Docs>
        <exception cref="T:System.IndexOutOfRangeException">
          <para>
            <paramref name="start" />
          </para>
          <para> &lt; 0. </para>
          <para>- or -</para>
          <para>
            <paramref name="start" /> &gt;= <paramref name="key" />.Length.</para>
          <para>- or -</para>
          <para>
            <paramref name="len" /> &gt; <paramref name="key" />.Length - <paramref name="start" />.</para>
          <para>The above conditions do not cause an exception to be thrown if <paramref name="len" /> = 0.</para>
        </exception>
        <exception cref="T:System.ArgumentOutOfRangeException">len &lt; 0.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>For more information on atomized strings, see <see cref="T:System.Xml.NameTable" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the atomized string containing the same characters as the specified range of characters in the given array.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The atomized string or null if the string has not already been atomized. If <paramref name="len" /> is zero, String.Empty is returned.</para>
        </returns>
        <param name="key">
          <attribution license="cc4" from="Microsoft" modified="false" />The character array containing the name to find. </param>
        <param name="start">
          <attribution license="cc4" from="Microsoft" modified="false" />The zero-based index into the array specifying the first character of the name. </param>
        <param name="len">
          <attribution license="cc4" from="Microsoft" modified="false" />The number of characters in the name. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>