<?xml version="1.0" encoding="utf-8"?>
<Type Name="StringEnumerator" FullName="System.Collections.Specialized.StringEnumerator">
  <TypeSignature Language="C#" Value="public class StringEnumerator" Maintainer="auto" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit StringEnumerator extends System.Object" />
  <AssemblyInfo>
    <AssemblyName>System</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
    <AssemblyVersion>1.0.3300.0</AssemblyVersion>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>The foreach statement of the C# language (for each in Visual Basic) hides the complexity of the enumerators.  Therefore, using foreach is recommended, instead of directly manipulating the enumerator.</para>
      <para>Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.</para>
      <para>Initially, the enumerator is positioned before the first element in the collection. <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> also brings the enumerator back to this position. At this position, calling <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> throws an exception. Therefore, you must call <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> to advance the enumerator to the first element of the collection before reading the value of <see cref="P:System.Collections.Specialized.StringEnumerator.Current" />.</para>
      <para>
        <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> returns the same object until either <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> or <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> is called. <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> sets <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> to the next element.</para>
      <para>If <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> passes the end of the collection, the enumerator is positioned after the last element in the collection and <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> returns false. When the enumerator is at this position, subsequent calls to <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> also return false. If the last call to <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> returned false, calling <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> throws an exception. To set <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> to the first element of the collection again, you can call <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> followed by <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" />.</para>
      <para>An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and the next call to <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> or <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> throws an <see cref="T:System.InvalidOperationException" />. If the collection is modified between <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> and <see cref="P:System.Collections.Specialized.StringEnumerator.Current" />, <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> returns the element that it is set to, even if the enumerator is already invalidated.</para>
      <para>The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.</para>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Supports a simple iteration over a <see cref="T:System.Collections.Specialized.StringCollection" />.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName="Current">
      <MemberSignature Language="C#" Value="public string Current { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string Current" />
      <MemberType>Property</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>
      <Docs>
        <value>To be added: an object of type 'string'</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>After an enumerator is created or after a <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> is called, <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> must be called to advance the enumerator to the first element of the collection before reading the value of <see cref="P:System.Collections.Specialized.StringEnumerator.Current" />; otherwise, <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> is undefined.</para>
          <para>
            <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> also throws an exception if the last call to <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> returned false, which indicates the end of the collection.</para>
          <para>
            <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> does not move the position of the enumerator, and consecutive calls to <see cref="P:System.Collections.Specialized.StringEnumerator.Current" /> return the same object until either <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> or <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> is called.</para>
          <para>An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and the next call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="M:System.Collections.IEnumerator.Reset" /> throws an <see cref="T:System.InvalidOperationException" />. If the collection is modified between <see cref="M:System.Collections.IEnumerator.MoveNext" /> and <see cref="P:System.Collections.IEnumerator.Current" />, <see cref="P:System.Collections.IEnumerator.Current" /> returns the element that it is set to, even if the enumerator is already invalidated.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the current element in the collection.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="MoveNext">
      <MemberSignature Language="C#" Value="public bool MoveNext ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool MoveNext() 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.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>After an enumerator is created or after a <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> is called, an enumerator is positioned before the first element of the collection, and the first call to <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> moves the enumerator over the first element of the collection.</para>
          <para>If <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> passes the end of the collection, the enumerator is positioned after the last element in the collection and <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> returns false. When the enumerator is at this position, subsequent calls to <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> also return false until <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> is called.</para>
          <para>An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and the next call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="M:System.Collections.IEnumerator.Reset" /> throws an <see cref="T:System.InvalidOperationException" />. If the collection is modified between <see cref="M:System.Collections.IEnumerator.MoveNext" /> and <see cref="P:System.Collections.IEnumerator.Current" />, <see cref="P:System.Collections.IEnumerator.Current" /> returns the element that it is set to, even if the enumerator is already invalidated.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Advances the enumerator to the next element of the collection.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</para>
        </returns>
      </Docs>
    </Member>
    <Member MemberName="Reset">
      <MemberSignature Language="C#" Value="public void Reset ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Reset() 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.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>
            <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" /> moves the enumerator to the beginning of the collection, before the first element. After <see cref="M:System.Collections.Specialized.StringEnumerator.Reset" />, <see cref="M:System.Collections.Specialized.StringEnumerator.MoveNext" /> must be called to advance the enumerator to the first element of the collection before reading the value of <see cref="P:System.Collections.Specialized.StringEnumerator.Current" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Sets the enumerator to its initial position, which is before the first element in the collection.</para>
        </summary>
      </Docs>
    </Member>
  </Members>
</Type>