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 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="Dictionary<TKey,TValue>+Enumerator" FullName="System.Collections.Generic.Dictionary<TKey,TValue>+Enumerator">
<TypeSignature Language="C#" Value="public struct Dictionary<TKey,TValue>.Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.IDictionaryEnumerator" />
<TypeSignature Language="ILAsm" Value=".class nested public sequential ansi serializable sealed beforefieldinit Dictionary`2/Enumerator<TKey, TValue> extends System.ValueType implements class System.Collections.Generic.IEnumerator`1<valuetype System.Collections.Generic.KeyValuePair`2<!TKey, !TValue>>, class System.Collections.IDictionaryEnumerator, class System.Collections.IEnumerator, class System.IDisposable" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeParameters>
<TypeParameter Name="TKey" />
<TypeParameter Name="TValue" />
</TypeParameters>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>></InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IDictionaryEnumerator</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Collections.Generic.Dictionary`2" /> generic class provides a mapping from a set of keys to a set of values. Each addition to the dictionary consists of a value and its associated key. Retrieving a value by using its key is very fast, close to O(1), because the <see cref="T:System.Collections.Generic.Dictionary`2" /> class is implemented as a hash table.</para>
<block subset="none" type="note">
<para>The speed of retrieval depends on the quality of the hashing algorithm of the type specified for <paramref name="TKey" />. </para>
</block>
<para>As long as an object is used as a key in the <see cref="T:System.Collections.Generic.Dictionary`2" />, it must not change in any way that affects its hash value. Every key in a <see cref="T:System.Collections.Generic.Dictionary`2" /> must be unique according to the dictionary's equality comparer. A key cannot be null, but a value can be, if the value type <paramref name="TValue" /> is a reference type.</para>
<para>
<see cref="T:System.Collections.Generic.Dictionary`2" /> requires an equality implementation to determine whether keys are equal. You can specify an implementation of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface by using a constructor that accepts a <paramref name="comparer" /> parameter; if you do not specify an implementation, the default generic equality comparer <see cref="P:System.Collections.Generic.EqualityComparer`1.Default" /> is used. If type <paramref name="TKey" /> implements the <see cref="T:System.IEquatable`1" /> generic interface, the default equality comparer uses that implementation.</para>
<block subset="none" type="note">
<para>For example, you can use the case-insensitive string comparers provided by the <see cref="T:System.StringComparer" /> class to create dictionaries with case-insensitive string keys.</para>
</block>
<para>The capacity of a <see cref="T:System.Collections.Generic.Dictionary`2" /> is the number of elements the <see cref="T:System.Collections.Generic.Dictionary`2" /> can hold. As elements are added to a <see cref="T:System.Collections.Generic.Dictionary`2" />, the capacity is automatically increased as required by reallocating the internal array.</para>
<para>For very large <see cref="T:System.Collections.Generic.Dictionary`2" /> objects, you can increase the maximum capacity to 2 billion elements on a 64-bit system by setting the enabled attribute of the <format type="text/html"><a href="5c7ea24a-39ac-4e5f-83b7-b9f9a1b556ab">gcAllowVeryLargeObjects</a></format> configuration element to true in the run-time environment.</para>
<para>For purposes of enumeration, each item in the dictionary is treated as a <see cref="T:System.Collections.Generic.KeyValuePair`2" /> structure representing a value and its key. The order in which the items are returned is undefined.</para>
<para>The foreach statement of the C# language (for each in C++, For Each in Visual Basic) requires the type of each element in the collection. Since the <see cref="T:System.Collections.Generic.Dictionary`2" /> is a collection of keys and values, the element type is not the type of the key or the type of the value. Instead, the element type is a <see cref="T:System.Collections.Generic.KeyValuePair`2" /> of the key type and the value type. For example:</para>
<para>code reference: Generic.Dictionary#11</para>
<para>The foreach statement is a wrapper around the enumerator, which allows only reading from the collection, not writing to it.</para>
<block subset="none" type="note">
<para>Because keys can be inherited and their behavior changed, their absolute uniqueness cannot be guaranteed by comparisons using the <see cref="M:System.Type.Equals(System.Object)" /> method. </para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents a collection of keys and values.</para>
</summary>
</Docs>
<Members>
<Member MemberName="Current">
<MemberSignature Language="C#" Value="public System.Collections.Generic.KeyValuePair<TKey,TValue> Current { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Collections.Generic.KeyValuePair`2<!TKey, !TValue> Current" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.KeyValuePair<TKey,TValue></ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="MoveNext">
<MemberSignature Language="C#" Value="public bool MoveNext ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool MoveNext() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionaryEnumerator.Entry">
<MemberSignature Language="C#" Value="System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.DictionaryEntry</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionaryEnumerator.Key">
<MemberSignature Language="C#" Value="object System.Collections.IDictionaryEnumerator.Key { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IDictionaryEnumerator.Key" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionaryEnumerator.Value">
<MemberSignature Language="C#" Value="object System.Collections.IDictionaryEnumerator.Value { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IDictionaryEnumerator.Value" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerator.Current">
<MemberSignature Language="C#" Value="object System.Collections.IEnumerator.Current { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IEnumerator.Current" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerator.Reset">
<MemberSignature Language="C#" Value="void IEnumerator.Reset ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.IEnumerator.Reset() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
</Members>
</Type>
|