File: IDictionaryEnumerator.xml

package info (click to toggle)
mono 6.14.1%2Bds2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,282,732 kB
  • sloc: cs: 11,182,461; xml: 2,850,281; ansic: 699,123; cpp: 122,919; perl: 58,604; javascript: 30,841; asm: 21,845; makefile: 19,602; sh: 10,973; python: 4,772; pascal: 925; sql: 859; sed: 16; php: 1
file content (163 lines) | stat: -rw-r--r-- 13,703 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="utf-8"?>
<Type Name="IDictionaryEnumerator" FullName="System.Collections.IDictionaryEnumerator" FullNameSP="System_Collections_IDictionaryEnumerator" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class interface public abstract IDictionaryEnumerator implements System.Collections.IEnumerator" />
  <TypeSignature Language="C#" Value="public interface IDictionaryEnumerator : System.Collections.IEnumerator" />
  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IDictionaryEnumerator implements class System.Collections.IEnumerator" />
  <MemberOfLibrary>BCL</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>mscorlib</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>
  <Interfaces>
    <Interface>
      <InterfaceName>System.Collections.IEnumerator</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes>
    <Attribute>
      <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>[Visual Basic, C#]</para>
      <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. The <see cref="M:System.Collections.IEnumerator.Reset" /> method also brings the enumerator back to this position. At this position, calling the <see cref="P:System.Collections.IEnumerator.Current" /> property throws an exception. Therefore, you must call the <see cref="M:System.Collections.IEnumerator.MoveNext" /> method to advance the enumerator to the first element of the collection before reading the value of <see cref="P:System.Collections.IEnumerator.Current" />.</para>
      <para>
        <see cref="P:System.Collections.IEnumerator.Current" /> returns the same object until either <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="M:System.Collections.IEnumerator.Reset" /> is called. <see cref="M:System.Collections.IEnumerator.MoveNext" /> sets <see cref="P:System.Collections.IEnumerator.Current" /> to the next element.</para>
      <para>If <see cref="M:System.Collections.IEnumerator.MoveNext" /> passes the end of the collection, the enumerator is positioned after the last element in the collection and <see cref="M:System.Collections.IEnumerator.MoveNext" /> returns false. When the enumerator is at this position, subsequent calls to <see cref="M:System.Collections.IEnumerator.MoveNext" /> also return false. If the last call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> returned false, calling <see cref="P:System.Collections.IEnumerator.Current" /> throws an exception. To set <see cref="P:System.Collections.IEnumerator.Current" /> to the first element of the collection again, you can call <see cref="M:System.Collections.IEnumerator.Reset" /> followed by <see cref="M:System.Collections.IEnumerator.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.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>
      <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>Enumerates the elements of a nongeneric dictionary.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName="Entry">
      <MemberSignature Language="ILASM" Value=".property valuetype System.Collections.DictionaryEntry Entry { public hidebysig virtual abstract specialname valuetype System.Collections.DictionaryEntry get_Entry() }" />
      <MemberSignature Language="C#" Value="public System.Collections.DictionaryEntry Entry { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Collections.DictionaryEntry Entry" />
      <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.Collections.DictionaryEntry</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <value>
          <para> The <see cref="T:System.Collections.DictionaryEntry" /> in the collection over which the current instance is positioned.</para>
        </value>
        <exception cref="T:System.InvalidOperationException">
          <para>The <see cref="T:System.Collections.IDictionaryEnumerator" /> is positioned before the first element of the dictionary or after the last element.</para>
          <para>-or-</para>
          <para>The dictionary was modified after the <see cref="T:System.Collections.IDictionaryEnumerator" /> was created.</para>
        </exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>After an enumerator is created or after the <see cref="M:System.Collections.IEnumerator.Reset" /> method is called, the <see cref="M:System.Collections.IEnumerator.MoveNext" /> method must be called to advance the enumerator to the first element of the collection before reading the value of the <see cref="P:System.Collections.IDictionaryEnumerator.Entry" /> property; otherwise, <see cref="P:System.Collections.IDictionaryEnumerator.Entry" /> is undefined.</para>
          <para>
            <see cref="P:System.Collections.IDictionaryEnumerator.Entry" /> also throws an exception if the last call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> returned false, which indicates the end of the collection.</para>
          <para>
            <see cref="P:System.Collections.IDictionaryEnumerator.Entry" /> does not move the position of the enumerator, and consecutive calls to <see cref="P:System.Collections.IDictionaryEnumerator.Entry" /> return the same object until either <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="M:System.Collections.IEnumerator.Reset" /> is called.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets both the key and the value of the current dictionary entry.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Key">
      <MemberSignature Language="ILASM" Value=".property object Key { public hidebysig virtual abstract specialname object get_Key() }" />
      <MemberSignature Language="C#" Value="public object Key { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance object Key" />
      <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.Object</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <value>
          <para>A <see cref="T:System.Object" /> that contains the
<see cref="P:System.Collections.DictionaryEntry.Key" /> 
of the <see cref="T:System.Collections.DictionaryEntry" /> in the collection over which the current instance is positioned.</para>
        </value>
        <exception cref="T:System.InvalidOperationException">
          <para>The <see cref="T:System.Collections.IDictionaryEnumerator" /> is positioned before the first element of the dictionary or after the last element.</para>
          <para>-or-</para>
          <para>The dictionary was modified after the <see cref="T:System.Collections.IDictionaryEnumerator" /> was instantiated.</para>
        </exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>After an enumerator is created or after the <see cref="M:System.Collections.IEnumerator.Reset" /> method is called, the <see cref="M:System.Collections.IEnumerator.MoveNext" /> method must be called to advance the enumerator to the first element of the collection before reading the value of the <see cref="P:System.Collections.IDictionaryEnumerator.Key" /> property; otherwise, <see cref="P:System.Collections.IDictionaryEnumerator.Key" /> is undefined.</para>
          <para>
            <see cref="P:System.Collections.IDictionaryEnumerator.Key" /> also throws an exception if the last call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> returned false, which indicates the end of the collection.</para>
          <para>
            <see cref="P:System.Collections.IDictionaryEnumerator.Key" /> does not move the position of the enumerator, and consecutive calls to <see cref="P:System.Collections.IDictionaryEnumerator.Key" /> return the same object until either <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="M:System.Collections.IEnumerator.Reset" /> is called.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the key of the current dictionary entry.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Value">
      <MemberSignature Language="ILASM" Value=".property object Value { public hidebysig virtual abstract specialname object get_Value() }" />
      <MemberSignature Language="C#" Value="public object Value { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance object Value" />
      <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.Object</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <value>
          <para>A <see cref="T:System.Object" /> that contains the
<see cref="P:System.Collections.DictionaryEntry.Value" /> 
of the <see cref="T:System.Collections.DictionaryEntry" /> in the collection over which the current instance is positioned.</para>
        </value>
        <exception cref="T:System.InvalidOperationException">
          <para>The <see cref="T:System.Collections.IDictionaryEnumerator" /> is positioned before the first element of the dictionary or after the last element.</para>
          <para>-or-</para>
          <para>The dictionary was modified after the <see cref="T:System.Collections.IDictionaryEnumerator" /> was created.</para>
        </exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>After an enumerator is created or after the <see cref="M:System.Collections.IEnumerator.Reset" /> method is called, the <see cref="M:System.Collections.IEnumerator.MoveNext" /> method must be called to advance the enumerator to the first element of the collection before reading the value of the <see cref="P:System.Collections.IDictionaryEnumerator.Value" /> property; otherwise, <see cref="P:System.Collections.IDictionaryEnumerator.Value" /> is undefined.</para>
          <para>
            <see cref="P:System.Collections.IDictionaryEnumerator.Value" /> also throws an exception if the last call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> returned false, which indicates the end of the collection.</para>
          <para>
            <see cref="P:System.Collections.IDictionaryEnumerator.Value" /> does not move the position of the enumerator, and consecutive calls to <see cref="P:System.Collections.IDictionaryEnumerator.Value" /> return the same object until either <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="M:System.Collections.IEnumerator.Reset" /> is called.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the value of the current dictionary entry.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>